public static void doCalc(DateTime I_TargetDate, string I_ConvertType, decimal I_Amount, ref decimal O_Amount, ref double O_ErrorCode) { ConvertExchangeRateHandler handler = new ConvertExchangeRateHandler(); decimal convertedAmount = handler.ConvertAmountByBankRate(I_TargetDate, I_ConvertType, I_Amount, ref O_ErrorCode); O_Amount = convertedAmount; }
public ActionResult ConvertAmountbyTaxRate(string paramDate, string convertType, decimal amount, ref double errorCode) { if (CommonUtil.IsNullOrEmpty(paramDate)) { return(Json(string.Empty)); } string dateString = paramDate.Replace("-", ""); DateTime?baseDate = DateTime.ParseExact(dateString, "ddMMyyyy", null); if (CommonUtil.IsNullOrEmpty(baseDate)) { return(Json(string.Empty)); } ObjectResultData res = new ObjectResultData(); ConvertExchangeRateHandler hand = new ConvertExchangeRateHandler(); res.ResultData = (decimal)hand.ConvertAmountByTaxRate((DateTime)baseDate, convertType, amount, ref errorCode); return(Json(res, JsonRequestBehavior.AllowGet)); }
public ActionResult GetExchangeTaxRate(string strTargetDate, ref double errorCode) { if (CommonUtil.IsNullOrEmpty(strTargetDate)) { return(Json(string.Empty)); } string dateString = strTargetDate.Replace("-", ""); DateTime?targetDate = DateTime.ParseExact(dateString, "ddMMyyyy", null); if (CommonUtil.IsNullOrEmpty(targetDate)) { return(Json(string.Empty)); } ObjectResultData res = new ObjectResultData(); ConvertExchangeRateHandler hand = new ConvertExchangeRateHandler(); res.ResultData = hand.GetExchangeTaxRate((DateTime)targetDate, ref errorCode); return(Json(res, JsonRequestBehavior.AllowGet)); }