Exemplo n.º 1
0
        public ActionResult FindPageList(string date1, string date2, string title)
        {
            var count = 0;
            var list  = MembersService.FindPageList(date1, date2, title, ref count, true);

            return(ToDataGrid(list, count));
        }
Exemplo n.º 2
0
        public ActionResult Export(string date1, string date2, string title)
        {
            int count = 0;
            var list  = MembersService.FindPageList(date1, date2, title, ref count, false);

            if (!list.Any())
            {
                return(RedirectAlert("Index", "暂无数据,请先确认是否已审核!"));
            }
            var dt = list.ToDataTable();

            string[] fields = { "Store", "MemberCardNum", "RealName", "Sex", "MobilePhone", "Weixin", "Email", "QQ", "ConsumerCredit", "UsableIntegral", "City", "Address", "CreateDT" };
            string[] names  = { "来源", "卡号", "姓名", "性别", "手机号", "微信号", "Email", "QQ号", "消费额度", "可用积分", "地区", "地址", "加入时间" };
            var      header = "";

            new ExportExcel()
            {
                IsBufferOutput = true, HeaderText = header
            }.ToExcel("会员", dt, fields, names, null, null);
            return(new EmptyResult());
        }