public void Modify(TransactionModifyArgs args) { TransactionName = args.TransactionName; DebitAccountId = args.DebitAccountId; CreditAccountId = args.CreditAccountId; TransactionAmount = args.TransactionAmount; IssuedTime = TimeUnit.FromDate(args.IssuedTime); }
public static Transaction Create(TransactionCreateArgs args) { Transaction transaction = new Transaction { TransactionId = Guid.NewGuid(), TransactionCode = RandomExpress.RandomizeString(16), TransactionName = args.TransactionName, DebitAccountId = args.DebitAccountId, CreditAccountId = args.CreditAccountId, TransactionAmount = args.TransactionAmount, IssuedTime = TimeUnit.FromDate(args.IssuedTime) }; return(transaction); }