Exemplo n.º 1
0
        public void SharingExcelDownload(AdminNinjaBarbie2016SharingQueryOptions options)
        {
            var query = service.GetSharings(options).OrderByDescending(x => x.CreateDate).ToList();
            var data  = query.Select(e => new {
                공유일  = e.CreateDate.ToString("yyyy-MM-dd HH:mm:ss"),
                디바이스 = e.User.Channel,
                이름   = e.User.Name,
                연락처  = e.User.Mobile,
                나이   = e.User.Age,
                택장난감 = e.User.SurprizeTypeDisplayName,
                SNS  = e.SnsTypeDisplayName,
                아이디  = e.SnsId,
                닉네임  = e.SnsName,
                URL  = e.Post,
                IP   = e.User.IpAddress
            }).ToList();

            common.ExcelDownLoad(data, "[2016 닌자바비 이벤트] 공유_" + DateTime.Now.ToString("yyyyMMddHHmmss"));
        }
Exemplo n.º 2
0
        public IQueryable <NinjaBarbie2016Sharing> GetSharings(AdminNinjaBarbie2016SharingQueryOptions options)
        {
            var predicate = options.BuildPredicate();

            return(sharingRepository.GetAll().AsExpandable().Where(predicate).AsQueryable());
        }
Exemplo n.º 3
0
        public PagedList.IPagedList <NinjaBarbie2016Sharing> AdminGetSharings(AdminNinjaBarbie2016SharingQueryOptions options)
        {
            var users = service.GetSharings(options).OrderByDescending(x => x.CreateDate);

            return(new SerializablePagedList <NinjaBarbie2016Sharing>(users, options.Page, options.PageSize));
        }