Ejemplo n.º 1
0
        public override void Update(OtherInvestmentModel model)
        {
            base.Update(model);
            OtherInvestmentBalaceHistory otherInvestmentBalanceHistory = this.FindFirstRelatedHistoryRecord(model.Id.Value);

            otherInvestmentBalanceHistory.Balance = model.OpeningBalance;
            otherInvestmentBalanceHistory.Date    = model.Created;
            this.otherInvestmentBalaceHistoryRepository.Update(otherInvestmentBalanceHistory);
            this.otherInvestmentBalaceHistoryRepository.Save();
        }
Ejemplo n.º 2
0
        public override int Add(OtherInvestmentModel model)
        {
            int id = base.Add(model);
            OtherInvestmentBalaceHistory otherInvestmentBalanceHistory = new OtherInvestmentBalaceHistory();

            otherInvestmentBalanceHistory.Balance           = model.OpeningBalance;
            otherInvestmentBalanceHistory.Date              = model.Created;
            otherInvestmentBalanceHistory.OtherInvestmentId = id;
            this.otherInvestmentBalaceHistoryRepository.Create(otherInvestmentBalanceHistory);
            this.otherInvestmentBalaceHistoryRepository.Save();
            return(id);
        }