public int deleteCard() { creditCardDAL creditCard = new creditCardDAL() { id = this.id }; return(creditCard.deleteCard()); }
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()); }
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); }
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()); }
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; }