public void Add(DCWallet dCWallet) { if (dCWallet != null) { _repository.DCWallets.Add(dCWallet); } }
public void Update(DCWallet dCWallet) { if (dCWallet != null) { _repository.Entry <Sql.DCWallet>(dCWallet).State = System.Data.Entity.EntityState.Modified; // _repository.SaveChanges(); } }
public static DCWalletDTO ConvertToDCWalletDTO(DCWallet dCWallet) { DCWalletDTO dCWalletDTO = new DCWalletDTO(); dCWalletDTO.DCId = dCWallet.DCId; dCWalletDTO.WalletBalance = dCWallet.WalletBalance; dCWalletDTO.AmountDueDate = dCWallet.AmountDueDate; dCWalletDTO.WalletId = dCWallet.WalletId; return(dCWalletDTO); }
public void AddDistributionCenterWallet(DistributionCenter distributionCenter) { DCWallet dCWallet = new DCWallet(); dCWallet.WalletId = unitOfWork.DashboardRepository.NextNumberGenerator("DCWallet"); dCWallet.DCId = distributionCenter.DCId; dCWallet.WalletBalance = 0; dCWallet.AmountDueDate = DateTimeHelper.GetISTDateTime().AddDays(10); distributionCenter.DCWallets.Add(dCWallet); // unitOfWork.DCWalletRepository.Add(dCWallet); }