Ejemplo n.º 1
0
 public TagAccountSnapshot(int userNo, int tagAccountNo, decimal balanceAmount, TagAccountSnapshotReason reason, DateTime createdTime)
 {
     No            = 0;
     UserNo        = userNo;
     TagAccountNo  = tagAccountNo;
     BalanceAmount = balanceAmount;
     Reason        = reason;
     CreatedTime   = createdTime;
     AccountName   = "";
     TagAccount    = null;
 }
Ejemplo n.º 2
0
        public void CreateTagAccountSnapshot(int tagAccountNo, TagAccountSnapshotReason reason)
        {
            var tagAccount = GetTagAccount(tagAccountNo);
            var latestSnapshotBalanceAmount = GetLatestTagAccountSnapshot(tagAccountNo);

            var newSnapshot = new TagAccountSnapshot(CurrentApplication.UserNo, tagAccountNo, tagAccount.Amount, reason,
                                                     CurrentApplication.DateTimeNow);

            if (latestSnapshotBalanceAmount != newSnapshot.BalanceAmount)
            {
                Save(newSnapshot);
            }
        }