コード例 #1
0
        public int deleteCard()
        {
            creditCardDAL creditCard = new creditCardDAL()
            {
                id = this.id
            };

            return(creditCard.deleteCard());
        }
コード例 #2
0
        public int updateCard()
        {
            creditCardDAL creditCard = new creditCardDAL()
            {
                id      = this.id,
                number  = this.number,
                month   = this.month,
                year    = this.year,
                digitNo = this.digitNo
            };

            return(creditCard.updateCard());
        }
コード例 #3
0
        public List <creditCardDAL> getCards()
        {
            creditCardDAL creditCard = new creditCardDAL()
            {
                customerId = this.customerId
            };
            List <creditCardDAL> cardList = new List <creditCardDAL>();

            cardList = creditCard.getCards();
            foreach (creditCardDAL credit in cardList)
            {
                credit.number = credit.number.Substring(credit.number.Length - 4, 4) + " - **** - **** - ****";
            }
            return(cardList);
        }
コード例 #4
0
        public string AddCard()
        {
            creditCardDAL card = new creditCardDAL()
            {
                id         = this.id,
                number     = this.number,
                month      = this.month,
                year       = this.year,
                digitNo    = this.digitNo,
                ownerId    = this.ownerId,
                customerId = this.customerId
            };

            return(card.addCard());
        }
コード例 #5
0
        public void getCardDetails(string id)
        {
            creditCardDAL creditCard = new creditCardDAL()
            {
                id = id
            };

            creditCard.getCardDetails();
            this.id      = creditCard.id;
            this.number  = creditCard.number;
            this.month   = creditCard.month;
            this.year    = creditCard.year;
            this.digitNo = creditCard.digitNo;
            this.ownerId = creditCard.ownerId;
            return;
        }