Beispiel #1
0
        public void UpdateBankCard(BankCardInfo bankCard, string userId)
        {
            using (var biz = new GameBizBusinessManagement())
            {
                biz.BeginTran();

                var manager = new BankCardManager();
                var entity  = manager.BankCardById(userId);
                if (entity == null)
                {
                    throw new Exception("修改信息未被查询到");
                }
                entity.BankCardNumber = bankCard.BankCardNumber;
                entity.BankCode       = bankCard.BankCode;
                entity.BankName       = bankCard.BankName;
                entity.BankSubName    = bankCard.BankSubName;
                entity.CityName       = bankCard.CityName;
                entity.ProvinceName   = bankCard.ProvinceName;
                entity.RealName       = bankCard.RealName;
                entity.UpdateTime     = DateTime.Now;
                manager.UpdateBankCard(entity);

                biz.CommitTran();
            }
        }
Beispiel #2
0
        public void CancelBankCard(string userId)
        {
            using (var biz = new GameBizBusinessManagement())
            {
                biz.BeginTran();
                var manager = new BankCardManager();
                var entity  = manager.BankCardById(userId);
                if (entity == null)
                {
                    throw new Exception("未查到信息");
                }
                manager.DeleteBankCard(entity);

                biz.CommitTran();
            }
        }