private void UpdateRecord() { if (string.IsNullOrEmpty(TxtName.Text)) { return; } var capital = new AccountCapital { Name = TxtName.Text, Comment = "", LogRecord = DateTime.Now, Status = 1, UserId = UtilityClass.UserId }; using (var dbContext = new UnitOfWork()) { capital.Id = CapitalId; dbContext.AccountCapitalRepository.Update(capital); dbContext.Save(); DialogResult = DialogResult.OK; } }
public void DisposableCapitalTests(decimal totalCapital, decimal temporary, decimal deals, decimal compensations, decimal dividends, decimal totalUnRealisedPnl, decimal usedMargin, Percent disposableCapitalWithholdPercent, decimal disposable) { var accountCapital = new AccountCapital(0, totalCapital, totalUnRealisedPnl, temporary, deals, compensations, dividends, "assetId", usedMargin, disposableCapitalWithholdPercent ); Assert.That(accountCapital.Disposable, Is.EqualTo(disposable)); }