Ejemplo n.º 1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int  Add(BCW.Model.Textcent model)
        {
            //return dal.Add(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);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(BCW.Model.Textcent model)
 {
     dal.Update(model);
 }