コード例 #1
0
        public void CancelBankCard(string userId)
        {
            DB.Begin();
            var manager = new BankCardManager();
            var entity  = manager.BankCardById(userId);

            if (entity == null)
            {
                throw new Exception("未查到信息");
            }
            manager.DeleteBankCard(entity);
            DB.Commit();
        }
コード例 #2
0
        public void UpdateBankCard(C_BankCard bankCard, string userId)
        {
            DB.Begin();
            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);
            DB.Commit();
        }