diff --git a/Business/Mobile/MobileServices.cs b/Business/Mobile/MobileServices.cs
index 9a695d5..f1a0339 100644
--- a/Business/Mobile/MobileServices.cs
+++ b/Business/Mobile/MobileServices.cs
@@ -398,7 +398,7 @@ namespace Business.Mobile
CAmount = Convert.ToDecimal(m.cAmount == "" ? "0" : m.cAmount),
CardOnline = "",
CollCurrency = m.sCurrency,
- CouponCode = "",
+ CouponCode = m.DeviceType,
CustomerId = 0,
IsExRateCalcByPartner = false,
IsManualSc = false,
@@ -2203,7 +2203,7 @@ namespace Business.Mobile
if (liWalletStmtResponse == null)
{
jsonRx.ErrorCode = "1";
- jsonRx.Msg = "No wallet statement found.";
+ jsonRx.Msg = "No Record(s) Found!";
jsonRx.Data = new System.Collections.ArrayList();
Log.Debug("GetWalletStatement | Returning null while fetching the list of wallet statements.");
return jsonRx;
@@ -2437,7 +2437,7 @@ namespace Business.Mobile
if (requiredList.Count > 0)
{
// string.Format("Required Fields:-" , string.Join(", ", requiredList.Select(x => x.Key).ToList()));
- jsonResult.SetResponse("100", 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/Business/SendMoney/SendMoneyBusiness.cs b/Business/SendMoney/SendMoneyBusiness.cs
index 3426171..34445b4 100644
--- a/Business/SendMoney/SendMoneyBusiness.cs
+++ b/Business/SendMoney/SendMoneyBusiness.cs
@@ -157,7 +157,7 @@ namespace Business.SendMoney
CAmount = Convert.ToDecimal(m.cAmount == "" ? "0" : m.cAmount),
CardOnline = "",
CollCurrency = m.sCurrency,
- CouponCode = "",
+ CouponCode = m.DeviceType,
CustomerId = 0,
IsManualSc = false,
IsOnline = false,
diff --git a/Common/Helper/GetStatic.cs b/Common/Helper/GetStatic.cs
index 6e2091c..6ca8ce6 100644
--- a/Common/Helper/GetStatic.cs
+++ b/Common/Helper/GetStatic.cs
@@ -57,6 +57,13 @@ namespace Common.Helper
else
return strVal;
}
+ public static String ShowDecimal1(String strVal)
+ {
+ if (strVal != "")
+ return double.Parse(strVal).ToString("0.00");
+ else
+ return strVal;
+ }
public static String ShowCommaAmt(string strVal)
{
diff --git a/Common/Model/ExRateCalculateRequest.cs b/Common/Model/ExRateCalculateRequest.cs
index 1d242f5..4982e87 100644
--- a/Common/Model/ExRateCalculateRequest.cs
+++ b/Common/Model/ExRateCalculateRequest.cs
@@ -23,6 +23,7 @@ namespace Common.Model
public string tpPCurrnecy { get; set; }
public string userId { get; set; }
public string discountedFee { get; set; }
+ public string DeviceType { get; set; }
}
public class CommonRequest
diff --git a/JsonRx/Api/CustomerController.cs b/JsonRx/Api/CustomerController.cs
index 08f6d06..ca4c93e 100644
--- a/JsonRx/Api/CustomerController.cs
+++ b/JsonRx/Api/CustomerController.cs
@@ -123,11 +123,11 @@ namespace JsonRx.Api
// newUserRegister.phoneOs = Util.GetDeviceType(Request);
newUserRegister.FullName= newUserRegister.FullName.ToTitleCase(TitleCase.All);
var custRegisterResponse = _requestServices.NewUserRegister(newUserRegister);
-
+ Log.Debug("NewUserRegister | RESPONSE : " + JsonConvert.SerializeObject(custRegisterResponse));
return Ok(custRegisterResponse);
}
- return ModelValidationError(ModelState);
+ return ModelValidationError(ModelState,"100");
}
///
@@ -378,14 +378,14 @@ namespace JsonRx.Api
///
///
///
- protected IHttpActionResult ModelValidationError(ModelStateDictionary modelState)
+ protected IHttpActionResult ModelValidationError(ModelStateDictionary modelState, string error="")
{
var modelErrors = modelState.Select(x => x.Value.Errors)
.Where(y => y.Count > 0)
.First()[0].ErrorMessage;
JsonRxResponse jsonRx = new JsonRxResponse()
{
- ErrorCode = "1",
+ ErrorCode = error??"1",
Msg = string.IsNullOrEmpty(modelErrors) ? "It seems like incorrect Json input(s)." : modelErrors,
Data = ""
};
diff --git a/JsonRx/Api/SendMoneyController.cs b/JsonRx/Api/SendMoneyController.cs
index 996c7da..b2d9e89 100644
--- a/JsonRx/Api/SendMoneyController.cs
+++ b/JsonRx/Api/SendMoneyController.cs
@@ -135,6 +135,7 @@ namespace JsonRx.Api
LogicalThreadContext.Properties[LoggerProperty.PROCESSID] = pId;
LogicalThreadContext.Properties[LoggerProperty.METHODNAME] = "calculate";
LogicalThreadContext.Properties[LoggerProperty.CREATEDBY] = model.userId;
+ model.DeviceType= Util.GetDeviceType(Request);
Log.Debug("Calculate | REQUEST : " + JsonConvert.SerializeObject(model));
if (ModelState.IsValid)
{
diff --git a/Repository/Authentication/AuthenticationRepo.cs b/Repository/Authentication/AuthenticationRepo.cs
index 5381ed0..50dba97 100644
--- a/Repository/Authentication/AuthenticationRepo.cs
+++ b/Repository/Authentication/AuthenticationRepo.cs
@@ -130,47 +130,47 @@ namespace Repository.Authentication
// ls.Msg = dataTable.Rows[0]["errorCode"] + Convert.ToString(dataTable.Rows[0]["msg"]);
//return ls;
- string enumString = string.Empty;
+ //string enumString = string.Empty;
- if (dataTable.Rows[0]["errorCode"].Equals("1"))
- {
- enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_1.ToString();
- }
- else if (dataTable.Rows[0]["errorCode"].Equals("2"))
- {
- enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_2.ToString();
- }
- else if (dataTable.Rows[0]["errorCode"].Equals("3"))
- {
- enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_3.ToString();
- }
- else if (dataTable.Rows[0]["errorCode"].Equals("4"))
- {
- enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_4.ToString();
- }
- else if (dataTable.Rows[0]["errorCode"].Equals("5"))
- {
- enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_5.ToString();
- }
- else if (dataTable.Rows[0]["errorCode"].Equals("6"))
- {
- enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_6.ToString();
- }
- else if (dataTable.Rows[0]["errorCode"].Equals("7"))
- {
- enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_7.ToString();
- }
- else if (dataTable.Rows[0]["errorCode"].Equals("8"))
- {
- enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_8.ToString();
- }
- else if (dataTable.Rows[0]["errorCode"].Equals("20"))
- {
- enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_20.ToString();
- }
+ //if (dataTable.Rows[0]["errorCode"].Equals("1"))
+ //{
+ // enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_1.ToString();
+ //}
+ //else if (dataTable.Rows[0]["errorCode"].Equals("2"))
+ //{
+ // enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_2.ToString();
+ //}
+ //else if (dataTable.Rows[0]["errorCode"].Equals("3"))
+ //{
+ // enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_3.ToString();
+ //}
+ //else if (dataTable.Rows[0]["errorCode"].Equals("4"))
+ //{
+ // enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_4.ToString();
+ //}
+ //else if (dataTable.Rows[0]["errorCode"].Equals("5"))
+ //{
+ // enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_5.ToString();
+ //}
+ //else if (dataTable.Rows[0]["errorCode"].Equals("6"))
+ //{
+ // enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_6.ToString();
+ //}
+ //else if (dataTable.Rows[0]["errorCode"].Equals("7"))
+ //{
+ // enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_7.ToString();
+ //}
+ //else if (dataTable.Rows[0]["errorCode"].Equals("8"))
+ //{
+ // enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_8.ToString();
+ //}
+ //else if (dataTable.Rows[0]["errorCode"].Equals("20"))
+ //{
+ // enumString = RESPONSE_MSG.LOGIN_TO_SYSTEM_FAIL_20.ToString();
+ //}
- var map = Utilities.GetLanguageMapping(enumString, lang);
- return new LoginResponse { ErrorCode = dataTable.Rows[0]["errorCode"].Equals("0") ? "0" : "1", Msg = map.Message};
+ // var map = Utilities.GetLanguageMapping(enumString, lang);
+ return new LoginResponse { ErrorCode = dataTable.Rows[0]["errorCode"].Equals("0") ? "0" : "1", Msg = Convert.ToString(dataTable.Rows[0]["msg"]) };
//ls.Msg = map.Message;
}
diff --git a/Repository/Mobile/MobileServicesRepo.cs b/Repository/Mobile/MobileServicesRepo.cs
index 8e0a8c1..265292e 100644
--- a/Repository/Mobile/MobileServicesRepo.cs
+++ b/Repository/Mobile/MobileServicesRepo.cs
@@ -1006,16 +1006,16 @@ namespace Repository.Mobile
accountNo = sRow["accountNo"].ToString(),
payoutBankBranch = sRow["pBranchName"].ToString(),
pAgentBank = sRow["pAgent"].ToString() ?? "[ANY WHERE]",
- collAmount = GetStatic.ShowDecimal(sRow["cAmt"].ToString()) + " " + sRow["collCurr"].ToString(),
+ collAmount = GetStatic.ShowDecimal1(sRow["cAmt"].ToString()) + " " + sRow["collCurr"].ToString(),
exRate = sRow["exRate"].ToString(),
- serviceCharge = GetStatic.ShowDecimal(sRow["serviceCharge"].ToString()) + " " + sRow["collCurr"].ToString(),
+ serviceCharge = GetStatic.ShowDecimal1(sRow["serviceCharge"].ToString()) + " " + sRow["collCurr"].ToString(),
payOutAmount = GetStatic.ShowDecimal(sRow["pAmt"].ToString()) + " " + sRow["payoutCurr"].ToString(),
couponName = sRow["couponName"].ToString(),
discountType = sRow["discountType"].ToString(),
discountValue = sRow["discountValue"].ToString(),
discountPercent = sRow["discountPercent"].ToString(),
tranStatus = sRow["tranStatus"].ToString(),
- rewardPoints = sRow["rewardPoints"].ToString(),
+ rewardPoints = GetStatic.ShowDecimal1(sRow["rewardPoints"].ToString()),
ColorIcon = GetColor(sRow["PayStatus"].ToString()),
SenderFullName = sRow["senderName"].ToString(),
PaymentDetails = new PaymentDetails()
@@ -3137,7 +3137,7 @@ namespace Repository.Mobile
{
CustomerName = row1["CUSTOMER_NAME"].ToString(),
RewardAmount = string.Format("{0:0.##}", row1["REWARD_AMOUNT"].ToString()),
- RewardType = row1["REWARD_TYPE"].ToString(),
+ RewardType = $"{row1["CUSTOMER_NAME"].ToString()} - { row1["REWARD_TYPE"].ToString()}",
DestinationCustomerId = row1["DESTINATION_CUSTOMERID"].ToString(),
CreatedDate = row1["CREATED_DATE"].ToString()
});