public ActionResult ExportStatistics(LotteryRecordSearch condition) { string where = LotteryRecordSearch.StrWhere(condition); DataTable dt = ExportWay.ExcelDataTable("select ActivityTitle,PrizeLevel,PrizeImgUrl,PrizeName,COUNT(*) num from LotteryRecord where 1=1 " + where + " group by ActivityTitle,PrizeID,PrizeLevel,PrizeImgUrl,PrizeName "); string[] list = { "活动名称", "奖品等级", "奖品名称", "中奖数量" }; return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "中奖纪录统计" + DateTime.Now.ToShortTimeString() + ".xls")); }
public ActionResult ExportExcel(LotteryRecordSearch condition) { StringBuilder where = new StringBuilder(); where.Append("select [SerialNumber],[Dat],[IntegralCode],redMoney from [LotteryRecord] where 1=1 "); where.Append(LotteryRecordSearch.StrWhere(condition)); DataTable dt = ExportWay.ExcelDataTable(where.ToString()); string[] list = { "流水号", "中奖时间", "防伪码", "红包金额" }; return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "中奖纪录" + DateTime.Now.ToShortTimeString() + ".xls")); }
public ActionResult ExportExcel(LotteryRecordSearch condition) { StringBuilder where = new StringBuilder(); where.Append("select [Dat],[IntegralCode],[ActivityTitle],[PrizeLevel],[PrizeName],Name,Phone,RecAddress,[States] from [LotteryRecord] where 1=1 "); where.Append(LotteryRecordSearch.StrWhere(condition)); DataTable dt = ExportWay.ExcelDataTable(where.ToString()); string[] list = { "中奖时间", "防伪码", "活动名称", "奖品等级", "奖品名称", "中奖人姓名", "电话", "地址", "发放状态" }; return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "中奖纪录" + DateTime.Now.ToShortTimeString() + ".xls")); }
/// <summary> /// 读取应付返利列表 /// </summary> /// <param name="condition"></param> /// <param name="where"></param> /// <returns></returns> private ActionResult GetOutRebateListPage(LotteryRecordSearch condition, string where) { PageJsonModel <LotteryRecord> page = new PageJsonModel <LotteryRecord>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = string.Format(@"( select * from dbo.LotteryRecord where 1=1 {0} ) as Show", where); page.strSelect = " * "; page.strWhere = ""; page.strOrder = "Dat desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetRecords(LotteryRecordSearch condition) { string where = LotteryRecordSearch.StrWhere(condition); PageJsonModel <LotteryRecord> page = new PageJsonModel <LotteryRecord>(); page.pageIndex = condition.pageIndex; page.strForm = " LotteryRecord "; page.strSelect = "* "; page.pageSize = condition.pageSize; page.strWhere = where; page.strOrder = " ID Desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }
public ActionResult GetStatistics(LotteryRecordSearch condition) { string where = LotteryRecordSearch.StrWhere(condition); PageJsonModel <LotteryRecord> page = new PageJsonModel <LotteryRecord>(); page.pageIndex = condition.pageIndex; page.strForm = " (select ActivityTitle,PrizeID,PrizeLevel,PrizeImgUrl,PrizeName,COUNT(*) num from LotteryRecord where 1=1 " + where + " group by ActivityTitle,PrizeID,PrizeLevel,PrizeImgUrl,PrizeName ) Lotteryshow "; page.strSelect = " * "; page.pageSize = condition.pageSize; page.strOrder = " PrizeID Desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }