Ejemplo n.º 1
0
        /// <summary>
        /// 获取积分投注开奖公告
        /// </summary>
        /// <param name="flowId">流水号</param>
        /// <returns>积分投注开奖公告对象</returns>
        public virtual TBPNumNotice Get(string flowId)
        {
            TBPNumNotice tbPNumNotice = null;

            try
            {
                string strSQL = "select * from TBPNumNotice where flowId=@flowId";
                Param  param  = new Param();
                param.Clear();
                param.Add("@flowId", flowId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbPNumNotice = ReadData(dr);
                }
                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbPNumNotice);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 加载指定积分投注开奖公告
 /// </summary>
 /// <param name="flowId">流水号</param>
 public void Load(string flowId)
 {
     try
     {
         TBPNumNotice tbPNumNotice = tbPNumNoticeDAO.Get(flowId);
         WebJson.ToJson(context, tbPNumNotice);
     }
     catch (Exception e)
     {
         Message.error(context, e.Message);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 读取积分投注开奖公告信息
        /// </summary>
        /// <param name="dr">记录指针</param>
        /// <returns>积分投注开奖公告对象</returns>
        protected virtual TBPNumNotice ReadData(ComDataReader dr)
        {
            TBPNumNotice tbPNumNotice = new TBPNumNotice();

            tbPNumNotice.flowId      = dr["flowId"].ToString();      //流水号
            tbPNumNotice.gameId      = dr["gameId"].ToString();      //游戏编号
            tbPNumNotice.period      = dr["period"].ToString();      //期次
            tbPNumNotice.startTime   = dr["startTime"].ToString();   //开售时间
            tbPNumNotice.endTime     = dr["endTime"].ToString();     //截止时间
            tbPNumNotice.publishTime = dr["publishTime"].ToString(); //开奖时间
            tbPNumNotice.numbers     = dr["numbers"].ToString();     //开奖号码
            return(tbPNumNotice);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 增加积分投注开奖公告
 /// </summary>
 /// <param name="tbPNumNotice">积分投注开奖公告</param>
 public void Add(TBPNumNotice tbPNumNotice)
 {
     try
     {
         tbPNumNoticeDAO.Add(tbPNumNotice);
         Message.success(context, "积分投注开奖公告增加成功");
         loginSession.Log("XXXXXX积分投注开奖公告增加成功");
     }
     catch (Exception e)
     {
         Message.error(context, "积分投注开奖公告增加失败");
         loginSession.Log(e.Message);
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 修改积分投注开奖公告
        /// </summary>
        /// <param name="data">数据库连接</param>
        /// <param name="tbPNumNotice">积分投注开奖公告</param>
        public virtual void Edit(DataAccess data, TBPNumNotice tbPNumNotice)
        {
            string strSQL = "update TBPNumNotice set gameId=@gameId,period=@period,startTime=@startTime,endTime=@endTime,publishTime=@publishTime,numbers=@numbers where flowId=@flowId";
            Param  param  = new Param();

            param.Clear();
            param.Add("@gameId", tbPNumNotice.gameId);           //游戏编号
            param.Add("@period", tbPNumNotice.period);           //期次
            param.Add("@startTime", tbPNumNotice.startTime);     //开售时间
            param.Add("@endTime", tbPNumNotice.endTime);         //截止时间
            param.Add("@publishTime", tbPNumNotice.publishTime); //开奖时间
            param.Add("@numbers", tbPNumNotice.numbers);         //开奖号码
            param.Add("@flowId", tbPNumNotice.flowId);           //流水号
            data.ExecuteNonQuery(CommandType.Text, strSQL, param);
        }
Ejemplo n.º 6
0
        protected DataAccess db = new DataAccess(DataAccess.DBConn);//数据库连接

        #region 代码生成器自动生成


        /// <summary>
        /// 增加积分投注开奖公告
        /// </summary>
        /// <param name="data">数据库连接</param>
        /// <param name="tbPNumNotice">积分投注开奖公告</param>
        public virtual void Add(DataAccess data, TBPNumNotice tbPNumNotice)
        {
            string strSQL = "insert into TBPNumNotice (flowId,gameId,period,startTime,endTime,publishTime,numbers) values (@flowId,@gameId,@period,@startTime,@endTime,@publishTime,@numbers)";
            Param  param  = new Param();

            param.Clear();
            param.Add("@flowId", tbPNumNotice.flowId);           //流水号
            param.Add("@gameId", tbPNumNotice.gameId);           //游戏编号
            param.Add("@period", tbPNumNotice.period);           //期次
            param.Add("@startTime", tbPNumNotice.startTime);     //开售时间
            param.Add("@endTime", tbPNumNotice.endTime);         //截止时间
            param.Add("@publishTime", tbPNumNotice.publishTime); //开奖时间
            param.Add("@numbers", tbPNumNotice.numbers);         //开奖号码
            data.ExecuteNonQuery(CommandType.Text, strSQL, param);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 修改积分投注开奖公告
 /// </summary>
 /// <param name="tbPNumNotice">积分投注开奖公告</param>
 public virtual void Edit(TBPNumNotice tbPNumNotice)
 {
     try
     {
         db.Open();
         Edit(db, tbPNumNotice);
     }
     catch (Exception e)
     {
         throw e;
     }
     finally
     {
         db.Close();
     }
 }