|
@ -99,42 +99,16 @@ namespace Repository.Mobile |
|
|
var _dbRes = _dao.ParseDbResult(sql); |
|
|
var _dbRes = _dao.ParseDbResult(sql); |
|
|
Log.Debug("RequestOTP | DB RESPONSE : " + JsonConvert.SerializeObject(_dbRes)); |
|
|
Log.Debug("RequestOTP | DB RESPONSE : " + JsonConvert.SerializeObject(_dbRes)); |
|
|
|
|
|
|
|
|
string enumString = string.Empty; |
|
|
|
|
|
|
|
|
|
|
|
if (_dbRes.ResponseCode.Equals("100")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REQUEST_OTP_SUCCESS_1.ToString(); |
|
|
|
|
|
//_dbRes.ResponseCode = "0";
|
|
|
|
|
|
} |
|
|
|
|
|
else if (_dbRes.ResponseCode.Equals("103")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REQUEST_OTP_SUCCESS_2.ToString(); |
|
|
|
|
|
//_dbRes.ResponseCode = "0";
|
|
|
|
|
|
} |
|
|
|
|
|
else if (_dbRes.ResponseCode.Equals("1")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REQUEST_OTP_FAIL_1.ToString(); |
|
|
|
|
|
} |
|
|
|
|
|
else if (_dbRes.ResponseCode.Equals("2")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REQUEST_OTP_FAIL_2.ToString(); |
|
|
|
|
|
} |
|
|
|
|
|
else if (_dbRes.ResponseCode.Equals("3")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REQUEST_OTP_FAIL_3.ToString(); |
|
|
|
|
|
} |
|
|
|
|
|
else if (_dbRes.ResponseCode.Equals("4")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REQUEST_OTP_FAIL_4.ToString(); |
|
|
|
|
|
} |
|
|
|
|
|
else if (_dbRes.ResponseCode.Equals("5")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REQUEST_OTP_FAIL_5.ToString(); |
|
|
|
|
|
} |
|
|
|
|
|
var map = Utilities.GetLanguageMapping(enumString, lang); |
|
|
|
|
|
|
|
|
|
|
|
List<string> successCode = new List<string> { "0", "100", "103" }; |
|
|
List<string> successCode = new List<string> { "0", "100", "103" }; |
|
|
return new JsonRxResponse { ErrorCode = successCode.Contains(_dbRes.ResponseCode) ? "0" : "1", Msg = map.Message, Extra = _dbRes.Id, Extra2 = _dbRes.ResponseCode }; |
|
|
|
|
|
|
|
|
return new JsonRxResponse { ErrorCode = successCode.Contains(_dbRes.ResponseCode) ? "0" : "1", |
|
|
|
|
|
Msg = _dbRes.Msg, |
|
|
|
|
|
Extra = _dbRes.Id, |
|
|
|
|
|
Extra2 = _dbRes.ResponseCode, |
|
|
|
|
|
Extra3 = _dbRes.Extra }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//return new JsonRxResponse
|
|
|
//return new JsonRxResponse
|
|
|
//{
|
|
|
//{
|
|
@ -462,6 +436,10 @@ namespace Repository.Mobile |
|
|
sql += ", @mobile = " + _dao.FilterString(kyc.mobile); |
|
|
sql += ", @mobile = " + _dao.FilterString(kyc.mobile); |
|
|
sql += ", @additionalAddress = N" + _dao.FilterString(kyc.additionalAddress); |
|
|
sql += ", @additionalAddress = N" + _dao.FilterString(kyc.additionalAddress); |
|
|
sql += ", @idType = " + _dao.FilterString(kyc.idType); |
|
|
sql += ", @idType = " + _dao.FilterString(kyc.idType); |
|
|
|
|
|
sql += ", @idTypeNumber = " + _dao.FilterString(kyc.idNumber); |
|
|
|
|
|
sql += ", @idStartDate = " + _dao.FilterString(kyc.idStartDate); |
|
|
|
|
|
sql += ", @idEndDate = " + _dao.FilterString(kyc.idExpiryDate); |
|
|
|
|
|
sql += ", @idIssuingCountry = " + _dao.FilterString(kyc.idIssuingCountry); |
|
|
sql += ", @additionalIdType = " + _dao.FilterString(kyc.additionalIdType); |
|
|
sql += ", @additionalIdType = " + _dao.FilterString(kyc.additionalIdType); |
|
|
//IMAGES
|
|
|
//IMAGES
|
|
|
sql += ", @idFront = " + _dao.FilterString(kyc.idFront); |
|
|
sql += ", @idFront = " + _dao.FilterString(kyc.idFront); |
|
@ -483,28 +461,9 @@ namespace Repository.Mobile |
|
|
jsonRx.Extra = dataTable.Extra; |
|
|
jsonRx.Extra = dataTable.Extra; |
|
|
|
|
|
|
|
|
//var res = _dao.ParseDbResult(sql);
|
|
|
//var res = _dao.ParseDbResult(sql);
|
|
|
string enumString = string.Empty; |
|
|
|
|
|
|
|
|
|
|
|
if (dataTable.ResponseCode.Equals("0")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REGISTER_KYC_SUCCESS.ToString(); |
|
|
|
|
|
} |
|
|
|
|
|
else if (dataTable.ResponseCode.Equals("1")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REGISTER_KYC_FAIL_1.ToString(); |
|
|
|
|
|
} |
|
|
|
|
|
else if (dataTable.ResponseCode.Equals("2")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REGISTER_KYC_FAIL_2.ToString(); |
|
|
|
|
|
} |
|
|
|
|
|
else if (dataTable.ResponseCode.Equals("3")) |
|
|
|
|
|
{ |
|
|
|
|
|
enumString = RESPONSE_MSG.REGISTER_KYC_FAIL_3.ToString(); |
|
|
|
|
|
} |
|
|
|
|
|
var map = Utilities.GetLanguageMapping(enumString, lang); |
|
|
|
|
|
|
|
|
|
|
|
return new JsonRxResponse { ErrorCode = dataTable.ResponseCode.Equals("0") ? "0" : "1", Msg = map.Message.Replace("@Extra", dataTable.Extra) }; |
|
|
|
|
|
//return new JsonRxResponse { ErrorCode = dataTable.ResponseCode, Msg = dataTable.Msg };
|
|
|
|
|
|
|
|
|
return new JsonRxResponse { ErrorCode = dataTable.ResponseCode, Msg = dataTable.Msg }; |
|
|
//return jsonRx;
|
|
|
//return jsonRx;
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1345,6 +1304,7 @@ namespace Repository.Mobile |
|
|
sql += ", @mobile = " + _dao.FilterString(newUserRegister.MobileNumber); |
|
|
sql += ", @mobile = " + _dao.FilterString(newUserRegister.MobileNumber); |
|
|
sql += ", @postalCode = " + _dao.FilterString(newUserRegister.PostalCode); |
|
|
sql += ", @postalCode = " + _dao.FilterString(newUserRegister.PostalCode); |
|
|
sql += ", @address1 = " + _dao.FilterString(newUserRegister.Address1); |
|
|
sql += ", @address1 = " + _dao.FilterString(newUserRegister.Address1); |
|
|
|
|
|
sql += ", @address2 = " + _dao.FilterString(newUserRegister.Address2); |
|
|
sql += ", @city = " + _dao.FilterString(newUserRegister.City); |
|
|
sql += ", @city = " + _dao.FilterString(newUserRegister.City); |
|
|
sql += ", @gender = " + _dao.FilterString(newUserRegister.Gender); |
|
|
sql += ", @gender = " + _dao.FilterString(newUserRegister.Gender); |
|
|
|
|
|
|
|
@ -1405,9 +1365,22 @@ namespace Repository.Mobile |
|
|
{ |
|
|
{ |
|
|
var sql = "EXEC GetUserInfo @flag='basic-reg' "; |
|
|
var sql = "EXEC GetUserInfo @flag='basic-reg' "; |
|
|
sql += ", @emailId = " + _dao.FilterString(email); |
|
|
sql += ", @emailId = " + _dao.FilterString(email); |
|
|
|
|
|
|
|
|
UserDetails userDetails = _dao.ParseDbResult<UserDetails>(sql); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var row = _dao.ExecuteDataRow(sql); |
|
|
|
|
|
|
|
|
|
|
|
UserDetails userDetails = new UserDetails(); |
|
|
|
|
|
if (row!=null) |
|
|
|
|
|
{ |
|
|
|
|
|
userDetails.FullName = row["fullName"].ToString(); |
|
|
|
|
|
userDetails.CustomerId = row["customerid"].ToString(); |
|
|
|
|
|
userDetails.MembershipId = row["membershipid"].ToString(); |
|
|
|
|
|
userDetails.FirstName = row["Firstname"].ToString(); |
|
|
|
|
|
userDetails.Mobile = row["mobile"].ToString(); |
|
|
|
|
|
userDetails.MiddleName = row["middleName"].ToString(); |
|
|
|
|
|
userDetails.LastName = row["Lastname1"].ToString(); |
|
|
|
|
|
userDetails.Email = row["email"].ToString(); |
|
|
|
|
|
userDetails.Address = row["address"].ToString(); |
|
|
|
|
|
userDetails.RegisteredDate = DateTime.Parse( row["createdDate"].ToString()); |
|
|
|
|
|
} |
|
|
return userDetails; |
|
|
return userDetails; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -2865,7 +2838,8 @@ namespace Repository.Mobile |
|
|
select new IdType |
|
|
select new IdType |
|
|
{ |
|
|
{ |
|
|
id = vit.Field<int>("id").ToString(), |
|
|
id = vit.Field<int>("id").ToString(), |
|
|
text = vit.Field<string>("text") |
|
|
|
|
|
|
|
|
text = vit.Field<string>("text"), |
|
|
|
|
|
isBackRequired = Convert.ToBoolean(vit.Field<int>("isBackRequired")) |
|
|
}; |
|
|
}; |
|
|
kycData.IdType = vitr.ToList(); |
|
|
kycData.IdType = vitr.ToList(); |
|
|
|
|
|
|
|
@ -2905,6 +2879,7 @@ namespace Repository.Mobile |
|
|
idIssuingCountry = Convert.ToString(dt["idIssueCountry"]), |
|
|
idIssuingCountry = Convert.ToString(dt["idIssueCountry"]), |
|
|
idStartDate = Convert.ToString(dt["passportIssueDate"]), |
|
|
idStartDate = Convert.ToString(dt["passportIssueDate"]), |
|
|
idExpiryDate = Convert.ToString(dt["passportExpiryDate"]), |
|
|
idExpiryDate = Convert.ToString(dt["passportExpiryDate"]), |
|
|
|
|
|
idNumber = Convert.ToString(dt["passportNumber"]) |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
if (type.ToLower().Equals("kycv3-existing")) |
|
|
if (type.ToLower().Equals("kycv3-existing")) |
|
|