public IPagedList <FinancialConcertMarketingAgreeAdminViewModel> Get([FromUri] PageQueryOptions options) { var list = service.GetAll(); var data = mapperConfig.CreateMapper().Map <IList <FinancialConcertMarketingAgreeAdminViewModel> >(list); return(new SerializablePagedList <FinancialConcertMarketingAgreeAdminViewModel>(data, options.Page, options.PageSize)); }
public void ExcelDownload() { var list = service.GetAll(); var mapperData = mapperConfig.CreateMapper().Map <IList <FinancialConcertMarketingAgreeAdminViewModel> >(list); var data = mapperData.Select(x => new { 본인인증등록일시 = x.CreateDate, 채널 = x.ChannelDisplayName, IP = x.IpAddress, 이름 = x.Name, 연락처 = x.Mobile, 성별 = x.Gender, 생년월일 = x.BirthDay, 택회차 = x.ApplicationTurnDisplayName, 연락방식_전화 = x.PhoneCheck? "O" : "X", 연락방식_문자 = x.MessageCheck ? "O" : "X", 연락방식_이메일 = x.EmailCheck ? "O" : "X", 연락방식_우편 = x.PostCheck ? "O" : "X", 보유기간 = x.RetentionPeriodTypeDisplayName, 이메일 = x.Email, 주소 = x.AddressDisplayName, 응모완료일시 = x.CompleteDate }); common.ExcelDownLoad(data, "FinancialConcert_MarketingAgree_" + DateTime.Now.ToString("yyyyMMddHHmmss")); }