Пример #1
0
        ///// <summary>
        ///// 增加一条数据
        ///// </summary>
        //public int  Add(BCW.Model.ChatText model)
        //{
        //    return dal.Add(model);
        //}
        /// <summary>
        /// 增加一条数据
        /// 活跃抽奖入口_酷友热聊室
        /// </summary>
        public int Add(BCW.Model.ChatText model)
        {
            int    id                 = dal.Add(model);
            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不发内线
            string ActionText         = (ub.GetSub("ActionText", xmlPath));         //Action语句
            string ActionOpen         = (ub.GetSub("ActionOpen", xmlPath));         //Action语句开关
            int    UsId               = model.UsID;
            string UsName             = model.UsName;
            string Notes              = "聊吧酷友热聊室";

            //活跃抽奖开关
            if (WinnersStatus != "1" && WinnersOpenOrClose == "1")
            {
                try
                {
                    int isHit = new BCW.winners.winners().CheckActionForAll(0, 0, UsId, UsName, Notes, id);
                    if (isHit == 1)
                    {
                        if (WinnersGuessOpen == "1")
                        {
                            new BCW.BLL.Guest().Add(0, UsId, UsName, TextForUbb);//发内线到该ID
                            //if (ActionOpen == "1")
                            //{
                            //    Add(UsId, ActionText);
                            //}
                        }
                    }
                    //return id;
                }
                catch
                {
                    // return id;
                }
            }
            else
            {
            }

            // 蒙宗将 20160910 增加聊吧发言点值抽奖接口
            try { new BCW.Draw.draw().AddjfbyTz(UsId, UsName, "聊吧发言"); }
            catch { }
            return(id);
        }
Пример #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(BCW.Model.ChatText model)
 {
     dal.Update(model);
 }