/// <summary> /// 获取所有中奖的号码 /// </summary> /// <param name="args"></param> /// <returns></returns> public GetItemListResult GetLuckyTicketWinLogList(GetCampaign_LuckyTicketWinLogListArgs args) { List <CommandParameter> parameterList = new List <CommandParameter>(); parameterList.Add(new CommandParameter("@page", args.Page)); parameterList.Add(new CommandParameter("@pageSize", args.PageSize)); parameterList.Add(new CommandParameter("@campaignId", args.CampaignId)); DataSet dsResult = _campaignManager.DataBase.ExecuteDataSet(CommandType.StoredProcedure, "GetCampaign_LuckyTicketWinLogList", parameterList, new string[] { "result" }); if (dsResult.Tables[0].Rows.Count == 0 && args.Page > 1) { args.Page--; return(GetLuckyTicketWinLogList(args)); } GetItemListResult result = new GetItemListResult(); result.ItemList = dsResult.Tables[0]; int totalCount = int.Parse(dsResult.Tables[1].Rows[0][0].ToString()); result.TotalCount = totalCount; result.TotalPage = totalCount / args.PageSize; if (totalCount % args.PageSize > 0) { result.TotalPage++; } result.Page = args.Page; return(result); }
public ActionResult GetLuckyTicketWinLogList() { GetCampaign_LuckyTicketWinLogListArgs args = RequestArgs<GetCampaign_LuckyTicketWinLogListArgs>(); if (args == null) { return RespondResult(false, "参数无效。"); } args.DomainId = DomainContext.Domain.Id; args.AppId = DomainContext.AppId; GetItemListResult result = _campaignManager.LuckyTicket.GetLuckyTicketWinLogList(args); return RespondDataResult(result); }