/// <summary> /// 인자에 해당하는 이벤트 기획전 배너를 반환합니다. /// </summary> /// <param name="pageGroupCD"></param> /// <param name="exhibitYN"></param> /// <param name="pcExposeYN"></param> /// <param name="mobileExposeYN"></param> /// <param name="cateCD"></param> /// <returns></returns> public List <ViewModelEventBanner> GetEventBanners(int pageGroupCD, string exhibitYN, string pcExposeYN, string mobileExposeYN, int?cateCD) //public List<ViewModelEventBanner> GetEventBanners(PramModelEventBannerList parameters) { var option = new TransactionOptions { // Isolation Level 에 주의 IsolationLevel = IsolationLevel.ReadUncommitted, Timeout = TransactionManager.DefaultTimeout }; using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress, option)) { List <ModelEventBanner> tmpList = _daoGlobal.GetEventBanners(pageGroupCD, exhibitYN, pcExposeYN, mobileExposeYN, cateCD); List <ViewModelEventBanner> returnResult = new List <ViewModelEventBanner>(); if (tmpList != null && tmpList.Count > 0) { foreach (ModelEventBanner n in tmpList) { ViewModelEventBanner obj = new ViewModelEventBanner(); // TopHtmlYN 의 값에 따라, LinkUrl 을 분기 string tmpLinkUrl = string.Empty; if (n.TopHtmlYN == "P" || n.TopHtmlYN == "N") { tmpLinkUrl = n.RedirectionURL; } else { if (pcExposeYN.ToUpper().Equals("Y") && (mobileExposeYN.ToUpper().Equals("N") || string.IsNullOrEmpty(mobileExposeYN))) { tmpLinkUrl = "http://TOUR.THETRAVEL.CO.KR/event/event_view.aspx?seq=" + n.PromotionSeq; } if (mobileExposeYN.ToUpper().Equals("Y") && (pcExposeYN.ToUpper().Equals("N") || string.IsNullOrEmpty(pcExposeYN))) { tmpLinkUrl = "http://mTOUR.THETRAVEL.CO.KR/event.aspx?seq=" + n.PromotionSeq; } } obj.PcImage = "http://tourimage.interpark.com/Sites/Tour/Event/Main/" + n.ListImage; obj.MobileImage = "http://tourimage.interpark.com/Sites/Tour/Event/Main/" + n.MobileImage; obj.LinkUrl = tmpLinkUrl; obj.RedirectionURL = n.RedirectionURL; obj.PromotionTitle = n.PromotionTitle; returnResult.Add(obj); } } return(returnResult); } }