private void CreateBranchCashForAllBranches(Coin coin)
        {
            var branchs = _unitOfWork.GenericRepository <BWR.Domain.Model.Branches.Branch>().GetAll();

            foreach (var branch in branchs)
            {
                var branchCash = new BranchCash()
                {
                    Coin      = coin,
                    BranchId  = branch.Id,
                    IsEnabled = true,
                    CreatedBy = _appSession.GetUserName()
                };

                _unitOfWork.GenericRepository <BWR.Domain.Model.Branches.BranchCash>().Insert(branchCash);
            }
        }
Example #2
0
 private decimal CalcFromMainCoin(BranchCash branchCash, decimal amount)
 {
     return((branchCash.ExchangePrice != null && branchCash.ExchangePrice != 0) ? amount * branchCash.ExchangePrice.Value : 0);
 }