|
@ -37,53 +37,52 @@ namespace CustomerOnlineV2.Business.Business.RegisterBusiness |
|
|
public async Task<JsonRxResponse> AddCustomers(OnlineCustomerRegisterModel register) |
|
|
public async Task<JsonRxResponse> AddCustomers(OnlineCustomerRegisterModel register) |
|
|
{ |
|
|
{ |
|
|
var model1 = await _registerRepository.AddRegisterDetails(register); |
|
|
var model1 = await _registerRepository.AddRegisterDetails(register); |
|
|
return model1; |
|
|
|
|
|
//try
|
|
|
|
|
|
//{
|
|
|
|
|
|
// if (model1.ErrorCode.Equals("0"))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// List<Mapping> bodyMappings = new List<Notify.Mapping>();
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
if (model1.ErrorCode.Equals("0")) |
|
|
|
|
|
{ |
|
|
|
|
|
List<Mapping> bodyMappings = new List<Notify.Mapping>(); |
|
|
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "CustomerName", SText = register.fullName });
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "CustomerId", SText = "" });
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "UserId", SText = register.membershipId });
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "FirstName", SText = register.firstName });
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "MiddleName", SText = register.middleName });
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "LastName", SText = register.lastName1 });
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "MobileNo", SText = register.mobile });
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "Address", SText = register.address });
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "EMAIL_ID", SText = register.email });
|
|
|
|
|
|
// bodyMappings.Add(new Mapping() { SValue = "RegisteredDate", SText = "" });
|
|
|
|
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "CustomerName", SText = register.fullName }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "CustomerId", SText = "" }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "UserId", SText = register.membershipId }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "FirstName", SText = register.firstName }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "MiddleName", SText = register.middleName }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "LastName", SText = register.lastName1 }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "MobileNo", SText = register.mobile }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "Address", SText = register.address }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "EMAIL_ID", SText = register.email }); |
|
|
|
|
|
bodyMappings.Add(new Mapping() { SValue = "RegisteredDate", SText = "" }); |
|
|
|
|
|
|
|
|
// SendNotificationRequest request = new SendNotificationRequest()
|
|
|
|
|
|
// {
|
|
|
|
|
|
// IsBulkNotification = false,
|
|
|
|
|
|
// UserName = register.email,
|
|
|
|
|
|
// ProviderId = "BasicRegistration",
|
|
|
|
|
|
// NotificationTypeId = NOTIFICATION_TYPE.EMAIL.ToString(),
|
|
|
|
|
|
// Template = Common.Models.Notification.NotifyTemplate.BASIC_REGISTRATION_EMAIL,
|
|
|
|
|
|
// Recipients = new List<RecipientViewModel>()
|
|
|
|
|
|
// {
|
|
|
|
|
|
// new RecipientViewModel()
|
|
|
|
|
|
// {
|
|
|
|
|
|
// NotificationContent = new NotificationDTO() {
|
|
|
|
|
|
// Body = JsonConvert.SerializeObject(bodyMappings),
|
|
|
|
|
|
// //Title will be set by mapping json
|
|
|
|
|
|
// },
|
|
|
|
|
|
// Address= register.email
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// };
|
|
|
|
|
|
// var model = NotifierV2.SendNotification(request, NOTIFICATION_TYPE.EMAIL);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// return model1;
|
|
|
|
|
|
//}
|
|
|
|
|
|
//catch (Exception ex)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// _logger.LogError("Something Went Wrong, Please Try Again!!", ex);
|
|
|
|
|
|
// model1.SetResponse("1", "Error occurred while calling RequestOTP.");
|
|
|
|
|
|
// return model1;
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
SendNotificationRequest request = new SendNotificationRequest() |
|
|
|
|
|
{ |
|
|
|
|
|
IsBulkNotification = false, |
|
|
|
|
|
UserName = register.email, |
|
|
|
|
|
ProviderId = "BasicRegistration", |
|
|
|
|
|
NotificationTypeId = NOTIFICATION_TYPE.EMAIL.ToString(), |
|
|
|
|
|
Template = Common.Models.Notification.NotifyTemplate.BASIC_REGISTRATION_EMAIL, |
|
|
|
|
|
Recipients = new List<RecipientViewModel>() |
|
|
|
|
|
{ |
|
|
|
|
|
new RecipientViewModel() |
|
|
|
|
|
{ |
|
|
|
|
|
NotificationContent = new NotificationDTO() { |
|
|
|
|
|
Body = JsonConvert.SerializeObject(bodyMappings), |
|
|
|
|
|
//Title will be set by mapping json
|
|
|
|
|
|
}, |
|
|
|
|
|
Address= register.email |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
var model = NotifierV2.SendNotification(request, NOTIFICATION_TYPE.EMAIL); |
|
|
|
|
|
} |
|
|
|
|
|
return model1; |
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
|
|
|
_logger.LogError("Something Went Wrong, Please Try Again!!", ex); |
|
|
|
|
|
model1.SetResponse("1", "Error occurred while calling RequestOTP."); |
|
|
|
|
|
return model1; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public Task<AddressListResponse> GetAddressList(AddressRequest addressRequest) |
|
|
public Task<AddressListResponse> GetAddressList(AddressRequest addressRequest) |
|
|