Ejemplo 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;
        }
Ejemplo 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;
        }
Ejemplo n.º 3
0
 public void DelCardType(int id)
 {
     ClubCardTypeData cardTypeData = new ClubCardTypeData();
     cardTypeData.DelCardType(id);
 }
Ejemplo n.º 4
0
 public bool EditCardType(Model.VO.ClubCardTypeVO cardType)
 {
     ClubCardTypeData cardTypeData = new ClubCardTypeData();
     return cardTypeData.EditCardType(Mapper.Map<ClubCardTypeVO, ClubCardTypePO>(cardType));
 }
Ejemplo n.º 5
0
 public void AddCardType(Model.VO.ClubCardTypeVO cardType)
 {
     ClubCardTypeData cardTypeData = new ClubCardTypeData();
     cardTypeData.AddCardType(Mapper.Map<ClubCardTypeVO, ClubCardTypePO>(cardType));
 }