/// <summary>
        /// 对现货资金表添加一条增量数据,同时提交数据到数据库和内存
        /// </summary>
        /// <param name="deltaInfo"></param>
        /// <returns></returns>
        public bool AddDelta(XH_CapitalAccountTable_DeltaInfo deltaInfo)
        {
            deltaInfo.DeltaTime = DateTime.Now;

            MemoryLog.WriteXHCapitalInfo(deltaInfo);

            return(AddChange(deltaInfo));
        }
        /// <summary>
        /// 先提交数据到数据库,成功后要调用AddDeltaToMemory方法
        /// </summary>
        /// <param name="deltaInfo"></param>
        /// <param name="db"></param>
        /// <param name="transaction"></param>
        public void AddDeltaToDB(XH_CapitalAccountTable_DeltaInfo deltaInfo, Database db, DbTransaction transaction)
        {
            deltaInfo.DeltaTime = DateTime.Now;

            MemoryLog.WriteXHCapitalInfo(deltaInfo);

            AddChangeToDB(deltaInfo, db, transaction);
        }
        /// <summary>
        /// 先检查再加变化量
        /// </summary>
        /// <param name="func"></param>
        /// <param name="deltaInfo"></param>
        /// <param name="db"></param>
        /// <param name="transaction"></param>
        /// <returns></returns>
        public bool CheckAndAddDelta(Func <XH_CapitalAccountTableInfo, XH_CapitalAccountTable_DeltaInfo, bool> func, XH_CapitalAccountTable_DeltaInfo deltaInfo, Database db, DbTransaction transaction)
        {
            deltaInfo.DeltaTime = DateTime.Now;

            bool isSuccess = CheckAndAddChange(func, deltaInfo, db, transaction);

            if (isSuccess)
            {
                MemoryLog.WriteXHCapitalInfo(deltaInfo);
            }

            return(isSuccess);
        }