Esempio n. 1
0
        public ClubCardTypeVO GetCardTypeByID(int cardTypeID)
        {
            ClubCardTypeData cardTypeData = new ClubCardTypeData();
            ClubCardTypeVO cardTypeVO = new ClubCardTypeVO();
            ClubCardTypePO cardTypePO = cardTypeData.GetCardTypeByID(cardTypeID);
            cardTypeVO = Mapper.Map<ClubCardTypePO, ClubCardTypeVO>(cardTypePO);

            return cardTypeVO;
        }
Esempio n. 2
0
        public List<Model.VO.ClubCardTypeVO> GetAllCardType()
        {
            ClubCardTypeData cardTypeData = new ClubCardTypeData();
            List<ClubCardTypeVO> cardTypeVOList = new List<ClubCardTypeVO>();

            DataSet ds = cardTypeData.GetAllCardType();

            List<ClubCardTypePO> cardTypePOList = ds.GetEntity<List<ClubCardTypePO>>();

            //foreach (var i in cardTypePOList)
            //{
            //    cardTypeVOList.Add(Mapper.Map<ClubCardTypePO, ClubCardTypeVO>(i));
            //}
            if (cardTypePOList != null && cardTypePOList.Count > 0)
            {
                cardTypePOList.ForEach(i =>
                {
                    cardTypeVOList.Add(Mapper.Map<ClubCardTypePO, ClubCardTypeVO>(i));
                });
            }
            return cardTypeVOList;
        }
Esempio n. 3
0
 public void DelCardType(int id)
 {
     ClubCardTypeData cardTypeData = new ClubCardTypeData();
     cardTypeData.DelCardType(id);
 }
Esempio n. 4
0
 public bool EditCardType(Model.VO.ClubCardTypeVO cardType)
 {
     ClubCardTypeData cardTypeData = new ClubCardTypeData();
     return cardTypeData.EditCardType(Mapper.Map<ClubCardTypeVO, ClubCardTypePO>(cardType));
 }
Esempio n. 5
0
 public void AddCardType(Model.VO.ClubCardTypeVO cardType)
 {
     ClubCardTypeData cardTypeData = new ClubCardTypeData();
     cardTypeData.AddCardType(Mapper.Map<ClubCardTypeVO, ClubCardTypePO>(cardType));
 }