From 302ec2fd6d7a61ae3d470a86ec54d59f6925aee8 Mon Sep 17 00:00:00 2001 From: Leeza Baidar Date: Thu, 30 Nov 2023 13:04:04 +0545 Subject: [PATCH] #response code change --- Business/Mobile/MobileServices.cs | 34 +++++++++++++++---------------- JsonRx/Api/SendMoneyController.cs | 8 ++++---- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Business/Mobile/MobileServices.cs b/Business/Mobile/MobileServices.cs index 83c663d..a990f95 100644 --- a/Business/Mobile/MobileServices.cs +++ b/Business/Mobile/MobileServices.cs @@ -719,7 +719,7 @@ namespace Business.Mobile if (!jsonRx.ErrorCode.Equals("0")) { Log.Debug("RegisterKYC | Validate form failed : " + JsonConvert.SerializeObject(jsonRx)); - jsonRx.SetResponse("1", jsonRx.Msg); + jsonRx.SetResponse("100", jsonRx.Msg); return jsonRx; } @@ -1028,7 +1028,7 @@ namespace Business.Mobile { enumString = RESPONSE_MSG.VALIDATE_FORM_2.ToString(); var map = Utilities.GetLanguageMapping(enumString, lang); - jsonRx.SetResponse("1", map.Message); + jsonRx.SetResponse("100", map.Message); return jsonRx; } @@ -1038,7 +1038,7 @@ namespace Business.Mobile { enumString = RESPONSE_MSG.VALIDATE_FORM_9.ToString(); var map = Utilities.GetLanguageMapping(enumString, lang); - jsonRx.SetResponse("1", map.Message); + jsonRx.SetResponse("100", map.Message); return jsonRx; } @@ -1047,19 +1047,19 @@ namespace Business.Mobile if (string.IsNullOrEmpty(kyc.idExpiryDate)) { - jsonRx.SetResponse("1", "IdExpiryDate is required"); + jsonRx.SetResponse("100", "IdExpiryDate is required"); return jsonRx; } if (string.IsNullOrEmpty(kyc.idStartDate)) { - jsonRx.SetResponse("1", "Idissue Date is required"); + jsonRx.SetResponse("100", "Idissue Date is required"); return jsonRx; } if (string.IsNullOrEmpty(kyc.idIssuingCountry)) { - jsonRx.SetResponse("1", "idIssuingCountry is required"); + jsonRx.SetResponse("100", "idIssuingCountry is required"); return jsonRx; } } @@ -1117,7 +1117,7 @@ namespace Business.Mobile { enumString = RESPONSE_MSG.VALIDATE_FORM_1.ToString(); var map = Utilities.GetLanguageMapping(enumString, lang); - jsonRx.SetResponse("1", map.Message); + jsonRx.SetResponse("100", map.Message); return jsonRx; } } @@ -1125,7 +1125,7 @@ namespace Business.Mobile { enumString = RESPONSE_MSG.VALIDATE_FORM_10.ToString(); var map = Utilities.GetLanguageMapping(enumString, lang); - jsonRx.SetResponse("1", map.Message); + jsonRx.SetResponse("100", map.Message); return jsonRx; } @@ -1133,14 +1133,14 @@ namespace Business.Mobile { if (isBackRequired == "1" && additionalIdBackUrl == null) { - jsonRx.SetResponse("1", "Additional ID Back is required!"); + jsonRx.SetResponse("100", "Additional ID Back is required!"); return jsonRx; } if (string.IsNullOrEmpty(kyc.additionalIdType)) { enumString = RESPONSE_MSG.VALIDATE_FORM_8.ToString(); var map = Utilities.GetLanguageMapping(enumString, lang); - jsonRx.SetResponse("1", map.Message); + jsonRx.SetResponse("100", map.Message); return jsonRx; } } @@ -1149,7 +1149,7 @@ namespace Business.Mobile if (!IsValidImage(ref kyc, idFrontUrl, idBackUrl, idSideUrl, additionalIdUrl, facePictureUrl, additionalIdBackUrl)) { Log.Debug("IsValidatedForm | Validate Image : Failed"); - jsonRx.SetResponse("1", "Invalid image file."); + jsonRx.SetResponse("100", "Invalid image file."); return jsonRx; } @@ -1709,12 +1709,12 @@ namespace Business.Mobile JsonRxResponse _resp = new JsonRxResponse() { ErrorCode = "0", Msg = "Success" }; if (string.IsNullOrEmpty(confirmpwd)) { - _resp.SetResponse("1", "Password can not be empty!"); + _resp.SetResponse("100", "Password can not be empty!"); return _resp; } if (confirmpwd.Length < 6) { - _resp.SetResponse("1", "Password must be of atleast 6 digits!"); + _resp.SetResponse("100", "Password must be of atleast 6 digits!"); return _resp; } @@ -1754,7 +1754,7 @@ namespace Business.Mobile { enumString = RESPONSE_MSG.NEW_USER_REGISTER_FAIL_4.ToString(); var map = Utilities.GetLanguageMapping(enumString, lang); - res.SetResponse("1", map.Message); + res.SetResponse("100", map.Message); return res; } @@ -1763,7 +1763,7 @@ namespace Business.Mobile { enumString = RESPONSE_MSG.NEW_USER_REGISTER_FAIL_6.ToString(); var map = Utilities.GetLanguageMapping(enumString, lang); - res.SetResponse("1", map.Message); + res.SetResponse("100", map.Message); return res; } @@ -1772,7 +1772,7 @@ namespace Business.Mobile { enumString = RESPONSE_MSG.NEW_USER_REGISTER_FAIL_5.ToString(); var map = Utilities.GetLanguageMapping(enumString, lang); - res.SetResponse("1", map.Message); + res.SetResponse("100", map.Message); return res; } @@ -2414,7 +2414,7 @@ namespace Business.Mobile if (requiredList.Count > 0) { // string.Format("Required Fields:-" , string.Join(", ", requiredList.Select(x => x.Key).ToList())); - jsonResult.SetResponse("1", string.Format("Required Fields:-\r\n {0}", string.Join("\r\n", requiredList.Select(x => findMapKeyValue(x.Key)).ToList()))); + jsonResult.SetResponse("100", string.Format("Required Fields:-\r\n {0}", string.Join("\r\n", requiredList.Select(x => findMapKeyValue(x.Key)).ToList()))); return jsonResult; } diff --git a/JsonRx/Api/SendMoneyController.cs b/JsonRx/Api/SendMoneyController.cs index 948609d..996c7da 100644 --- a/JsonRx/Api/SendMoneyController.cs +++ b/JsonRx/Api/SendMoneyController.cs @@ -195,7 +195,7 @@ namespace JsonRx.Api if (model.DeliveryMethodId == "2" && (model.PAgent == null || model.PAgent == "" || model.PAgent == "0")) { - res.SetResponse("1", "Bank Id Is Required !"); + res.SetResponse("100", "Bank Id Is Required !"); return Ok(res); } if (!string.IsNullOrEmpty(model.PurposeOfRemittance) && @@ -203,17 +203,17 @@ namespace JsonRx.Api { if (string.IsNullOrEmpty(model.GoodsOrigin)) { - res.SetResponse("1", "GoodsOrigin is required!"); + res.SetResponse("100", "GoodsOrigin is required!"); return Ok(res); } if (string.IsNullOrEmpty(model.GoodsType)) { - res.SetResponse("1", "GoodsType is required!"); + res.SetResponse("100", "GoodsType is required!"); return Ok(res); } if (string.IsNullOrEmpty(model.PortOfShipment)) { - res.SetResponse("1", "PortOfShipment is required!"); + res.SetResponse("100", "PortOfShipment is required!"); return Ok(res); }