コード例 #1
0
        public bool UpdateRewardByAccIDForTopup(WalletTransactionUow eWalletTransactionUnitOfWork, string AccID, decimal rewardamount, string remarks)
        {
            var logWallet = new LogWallet();

            try
            {
                var RewardAcc = eWalletTransactionUnitOfWork.GetRewardByAccID(AccID);
                if (RewardAcc == null)
                {
                    logWallet.Log(MethodBase.GetCurrentMethod(), "Could not find Reward Account by AccID: " + AccID, null, "");
                    return(false);
                }
                RewardAcc.Reward_Amount = RewardAcc.Reward_Amount + rewardamount;
                RewardAcc.Updatedate    = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour,
                                                       DateTime.Now.Minute, DateTime.Now.Second);
                RewardAcc.CheckSumReward = BuildCheckSum_Reward(RewardAcc);
                RewardAcc.Remark         = remarks;
                eWalletTransactionUnitOfWork.DoUpdate(RewardAcc).SaveAndContinue();
                return(true);
            }
            catch (Exception ex)
            {
                logWallet.Log(MethodBase.GetCurrentMethod(), AccID, ex, "");
                return(false);
            }
        }