예제 #1
0
        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;
        }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }