public static object GenerateTrnObject(string strTradeDate, string strCtpy, string strPortfolio, string strCurrencyPair
                                               , string strContractCcy, string strCounterCcy, string strSpotRate
                                               , string strBSNear, string strSetDateNear, string strSwapPointNear
                                               , string strContractAmtNear, string strCounterAmtNear
                                               , string strBSFar, string strSetDateFar, string strSwapPointFar
                                               , string strContractAmtFar, string strCounterAmtFar, string strSpotDate, string strRemark, string strProductId1, bool settleFlag, bool blnIsSubmit)
        {
            try
            {
                DA_TRN TrnInfo1 = DealUIP.GenerateFXSwapTransactionObject1(SessionInfo, strTradeDate, strCtpy, strPortfolio, strCurrencyPair
                                                                           , strContractCcy, strCounterCcy, strSpotRate
                                                                           , strBSNear, strSetDateNear, strSwapPointNear, strContractAmtNear, strCounterAmtNear, strSpotDate, strRemark, settleFlag, strProductId1);
                DA_TRN TrnInfo2 = DealUIP.GenerateFXSwapTransactionObject2(SessionInfo, strTradeDate, strCtpy, strPortfolio, strCurrencyPair
                                                                           , strContractCcy, strCounterCcy, strSpotRate
                                                                           , strBSFar, strSetDateFar, strSwapPointFar
                                                                           , strContractAmtFar, strCounterAmtFar, strSpotDate, strRemark, settleFlag, TrnInfo1.VERSION);

                object PCESCEObject;
                CheckFXSpotLimits(blnIsSubmit, TrnInfo1, TrnInfo2, out PCESCEObject);
                return(new
                {
                    Result = "OK",
                    record = JsonConvert.SerializeObject(TrnInfo1, new IsoDateTimeConverter()),
                    record2 = JsonConvert.SerializeObject(TrnInfo2, new IsoDateTimeConverter()),
                    pcesce = PCESCEObject,
                    Message = ""
                });
            }
            catch (Exception ex)
            {
                return(new { Result = "ERROR", Message = ex.Message });
            }
        }