예제 #1
0
파일: Lucklist.cs 프로젝트: radtek/GitKB288
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add2(BCW.Model.Game.Lucklist model)
 {
     return(dal.Add2(model));
 }
예제 #2
0
파일: Lucklist.cs 프로젝트: radtek/GitKB288
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(BCW.Model.Game.Lucklist model)
 {
     dal.Update(model);
 }
예제 #3
0
파일: Lucklist.cs 프로젝트: radtek/GitKB288
 /// <summary>
 /// 更新本期数据
 /// </summary>
 public int Update2(BCW.Model.Game.Lucklist model)
 {
     return(dal.Update2(model));
 }
예제 #4
0
    /// <summary>
    /// 幸运28自动游戏程序
    /// </summary>
    /// <param name="LuckId">局数ID</param>
    /// <param name="dt">截止时间</param>
    private void ChangePalyLuck()
    {
        BCW.Model.Game.Lucklist luck = null;
        //new BCW.User.Luck28().Luck28Page();
        luck = new BCW.BLL.Game.Lucklist().GetNextLucklist();
        int LuckId = luck.ID;

        #region
        //long Sec = DT.DateDiff(luck.EndTime, DateTime.Now, 4);
        //if (LuckId > 0)
        //{
        //    //int UsIDNum = new BCW.BLL.Game.Luckpay().GetCount(LuckId);//当期下注ID数
        //    int UsIDNum = Utils.ParseInt(ub.GetSub("Luck28UsIDNum", xmlPath));

        //    //如果小于N个则自在不同秒数中自动出动1个ID来下注
        //    int BotNum = Utils.ParseInt(ub.GetSub("Luck28BotNum", xmlPath));
        //    if (BotNum == 0)
        //        BotNum = new Random().Next(3, 6);

        //    int BotLuckId = Utils.ParseInt(ub.GetSub("Luck28BotLuckId", xmlPath));
        //    if (BotLuckId != LuckId)
        //    {
        //        BotNum = new Random().Next(3, 6);
        //        UsIDNum = 0;
        //    }
        //    if (UsIDNum < BotNum || BotLuckId != LuckId)
        //    {
        //        int BotSec = new Random().Next(30, 50);
        //        DateTime BotTime = Convert.ToDateTime(ub.GetSub("Luck28BotTime", xmlPath));
        //        if (BotTime < DateTime.Now.AddSeconds(-BotSec))
        //        {
        //            //更新某分钟已出动过
        //            ub xml = new ub();
        //            xml.ReloadSub(xmlPath); //加载配置
        //            xml.dss["Luck28BotTime"] = DT.FormatDate(DateTime.Now, 0);
        //            xml.dss["Luck28BotLuckId"] = LuckId.ToString();
        //            xml.dss["Luck28BotNum"] = BotNum.ToString();
        //            xml.dss["Luck28UsIDNum"] = (UsIDNum + 1).ToString();

        //            System.IO.File.WriteAllText(HttpContext.Current.Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8);
        //            //进行自动下注
        //            PlayLuck(LuckId);
        //        }
        //    }
        //}
        #endregion

        //进行自动下注
        int hour = DateTime.Now.Hour;
        if (hour > 23 || hour < 9)
        {
            Response.Write("" + GameName + "_机器人已休息!close1");
        }
        else
        {
            //try
            //{
            if (luck.Bjkl8Qihao > 2)
            {
                PlayLuck(LuckId);;
                Response.Write("" + GameName + "_机器人正在工作中ok1!");
            }
            else
            {
                Response.Write("" + GameName + "_机器人购买失败!error1");
            }
            //}
            //catch
            //{
            //    Response.Write("" + GameName + "_机器人购买失败!系统未开期数error1");
            //}
        }
    }