예제 #1
0
파일: Speak.cs 프로젝트: radtek/GitKB288
        /// <summary>
        /// 增加一条数据
        /// 闲聊增加活跃抽奖入口
        /// 20160602姚志光
        /// </summary>
        public int Add(BCW.Model.Speak model)
        {
            int ID = dal.Add(model);

            try
            {
                string xmlPath            = "/Controls/winners.xml";
                string TextForUbb         = (ub.GetSub("TextForUbb", xmlPath));         //设置内线提示的文字
                string WinnersStatus      = (ub.GetSub("WinnersStatus", xmlPath));      //状态1维护2测试0正常
                string WinnersOpenOrClose = (ub.GetSub("WinnersOpenOrClose", xmlPath)); //0|停止放送机会|1|开启放送机会
                string WinnersOpenChoose  = (ub.GetSub("WinnersOpenChoose", xmlPath));  //1全社区2社区3仅游戏
                string WinnersGuessOpen   = (ub.GetSub("WinnersGuessOpen", xmlPath));   //1发内线2不发内线
                int    usid     = model.UsId;
                string username = model.UsName;
                string Notes    = "闲聊";
                int    id       = new BCW.BLL.Action().GetMaxId();
                int    isHit    = new BCW.winners.winners().CheckActionForAll(0, 0, usid, username, Notes, id);
                if (isHit == 1)
                {
                    if (WinnersGuessOpen == "1")
                    {
                        new BCW.BLL.Guest().Add(0, usid, username, TextForUbb);//发内线到该ID
                    }
                }
            }
            catch {  }

            try
            {
                int    usid     = model.UsId;
                string username = new BCW.BLL.User().GetUsName(usid);
                string Notes    = "闲聊发言";
                new BCW.Draw.draw().AddjfbyTz(usid, username, Notes);//点值抽奖
            }
            catch { }
            return(ID);
        }
예제 #2
0
파일: Speak.cs 프로젝트: radtek/GitKB288
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(BCW.Model.Speak model)
 {
     dal.Update(model);
 }