|
|
@ -749,8 +749,6 @@ namespace Business.Mobile |
|
|
|
Language = Convert.ToString(CallContext.GetData(Constants.Language)) |
|
|
|
}; |
|
|
|
Log.Debug("RegisterKYC | DB RESPONSE" + JsonConvert.SerializeObject(rep)); |
|
|
|
|
|
|
|
|
|
|
|
return rep; |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
@ -1779,6 +1777,7 @@ namespace Business.Mobile |
|
|
|
} |
|
|
|
return _resp; |
|
|
|
} |
|
|
|
|
|
|
|
public JsonRxResponse NewUserRegister(NewUserRegisterModel newUserRegister) |
|
|
|
{ |
|
|
|
var lang = Convert.ToString(CallContext.GetData(Constants.Language)); |
|
|
@ -1833,6 +1832,13 @@ namespace Business.Mobile |
|
|
|
return calculateAge; |
|
|
|
} |
|
|
|
|
|
|
|
//var calculateAge = CalculateAge(dob);
|
|
|
|
Log.Debug("NewUserRegister.IsValidAge | RESPONSE : " + JsonConvert.SerializeObject(calculateAge)); |
|
|
|
if (calculateAge.ErrorCode != "0") |
|
|
|
{ |
|
|
|
return calculateAge; |
|
|
|
} |
|
|
|
|
|
|
|
newUserRegister.MobileNumber = newUserRegister.MobileNumber.getUKFormattedNumber(); |
|
|
|
|
|
|
|
res = _requestServices.NewUserRegister(newUserRegister); |
|
|
@ -2554,11 +2560,11 @@ namespace Business.Mobile |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (receiver.address.Contains("@") && receiver.address.IsValidEmail()) |
|
|
|
{ |
|
|
|
jsonResult.SetResponse("1", "Please input valid receiver address!"); |
|
|
|
return jsonResult; |
|
|
|
} |
|
|
|
//if (receiver.address.Contains("@") && receiver.address.IsValidEmail())
|
|
|
|
//{
|
|
|
|
// jsonResult.SetResponse("1", "Please input valid receiver address!");
|
|
|
|
// return jsonResult;
|
|
|
|
//}
|
|
|
|
jsonResult = _requestServices.AddReceiver(customerId, receiver); |
|
|
|
|
|
|
|
if (jsonResult.ErrorCode == "0") |
|
|
@ -3111,5 +3117,63 @@ namespace Business.Mobile |
|
|
|
return jsonRx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public JsonRxResponse TempUserRegister(TempUserRegisterModel tempUserRegister) |
|
|
|
{ |
|
|
|
var lang = Convert.ToString(CallContext.GetData(Constants.Language)); |
|
|
|
|
|
|
|
JsonRxResponse res = new JsonRxResponse(); |
|
|
|
try |
|
|
|
{ |
|
|
|
string fullName = tempUserRegister.FullName; |
|
|
|
string mobileNo = tempUserRegister.MobileNumber; |
|
|
|
string enumString = string.Empty; |
|
|
|
string regStep = tempUserRegister.RegStep; |
|
|
|
|
|
|
|
if (regStep == "1") |
|
|
|
{ |
|
|
|
var ds = _requestServices.GetCustId(); |
|
|
|
string custId = ""; |
|
|
|
if (ds.Tables[0].Rows.Count > 0) |
|
|
|
{ |
|
|
|
custId = ds.Tables[0].Rows[0]["tempCustId"]?.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
int newCustId = 1; |
|
|
|
tempUserRegister.tempCustId = newCustId.ToString(); |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(custId)) |
|
|
|
{ |
|
|
|
newCustId = int.Parse(custId) + 1; |
|
|
|
tempUserRegister.tempCustId = newCustId.ToString(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (regStep == "2") |
|
|
|
{ |
|
|
|
if (!tempUserRegister.Email.IsValidEmail()) |
|
|
|
{ |
|
|
|
enumString = RESPONSE_MSG.NEW_USER_REGISTER_FAIL_4.ToString(); ; |
|
|
|
var map = Utilities.GetLanguageMapping(enumString, lang); |
|
|
|
res.SetResponse("100", map.Message); |
|
|
|
|
|
|
|
return res; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
tempUserRegister.MobileNumber = tempUserRegister.MobileNumber.getUKFormattedNumber(); |
|
|
|
|
|
|
|
res = _requestServices.TempUserRegister(tempUserRegister); |
|
|
|
|
|
|
|
Log.Debug("TempUserRegister | completed with db response. " + "ErrorCode: " + res.ErrorCode + " Msg: " + res.Msg); |
|
|
|
return res; |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
Log.Error("Something Went Wrong, Please Try Again!!", ex); |
|
|
|
res.SetResponse("1", "Error occurred while registering the customer."); |
|
|
|
return res; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |