123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Data.Common;
- using CB.Common;
- using CB.Data;
- using CB.Entity;
- using CB.Interface.Infrastructure;
- namespace CB.Data.SqlServer
- {
- public class LotteryAwardManage : ILotteryAwardrService
- {
- public string InterfaceId = "";
- public LotteryAwardManage(string interfaceId)
- {
- InterfaceId = interfaceId;
- }
- public IList<LotteryAwardInfo> GetLotteryAwardList()
- {
- IList<LotteryAwardInfo> list = new List<LotteryAwardInfo>();
- using (IDataReader reader = GetLotteryAward())
- {
- if (reader.Read())
- {
- list.Add(LoadEntity(reader));
- }
- while (reader.NextResult() && reader.Read())
- {
- list.Add(LoadEntity(reader));
- }
- reader.Close();
- }
- return list;
- }
- protected LotteryAwardInfo LoadEntity(IDataReader reader)
- {
- return new LotteryAwardInfo
- {
- Lottery = reader["lottery"].ToString().Trim(),
- LotteryName = reader["lotteryName"].ToString().Trim(),
- Qi = TypeConverter.ObjectToInt(reader["term"]),
- Addtime = TypeConverter.ObjectToDateTime(reader["addtime"], DateTime.MinValue),
- Detail = reader["detail"].ToString().Trim()
- };
- }
- /// <summary>
- /// 开奖详情--同步至55125
- /// 2014-07-09 JNswins
- /// </summary>
- /// <returns></returns>
- public IDataReader GetLotteryAward()
- {
- return DbHelper.ExecuteReader(InterfaceId, CommandType.StoredProcedure, "cc_st_kjdataFor55125");
- }
- }
- }
|