Пример #1
0
        //被举报用户禁言
        public bool jinyan(int messageId, int userId)
        {
            starweibo.Model.messageInfo onemsg = new messageInfo();
            starweibo.BLL.messageInfo   bllmsg = new starweibo.BLL.messageInfo();
            onemsg          = bllmsg.GetModel(messageId);
            onemsg.msgState = "read";
            bllmsg.Update(onemsg);

            starweibo.Model.powerInfo onemsgP = new powerInfo();
            starweibo.BLL.powerInfo   bllmsgP = new starweibo.BLL.powerInfo();
            onemsgP        = bllmsgP.GetModel(userId);
            onemsgP.fasong = "0";

            return(bllmsgP.Update(onemsgP));
        }
Пример #2
0
        //用户权限全解
        public bool kquan(int userId)
        {
            starweibo.Model.powerInfo usp    = new powerInfo();
            starweibo.BLL.powerInfo   bllusp = new starweibo.BLL.powerInfo();
            usp = bllusp.GetModel(userId);

            usp.zan      = "1";
            usp.pinglun  = "1";
            usp.at       = "1";
            usp.guanzhu  = "1";
            usp.jubao    = "1";
            usp.zhuanfa  = "1";
            usp.shoucang = "1";
            usp.fasong   = "1";

            return(bllusp.Update(usp));
        }
Пример #3
0
        //用户权限更改
        public bool quanxian(int userId, string type, string fuzhi)
        {
            starweibo.Model.powerInfo usp    = new powerInfo();
            starweibo.BLL.powerInfo   bllusp = new starweibo.BLL.powerInfo();
            usp = bllusp.GetModel(userId);
            switch (type)
            {
            case "zan":
                usp.zan = fuzhi;
                break;

            case "pinglun":
                usp.pinglun = fuzhi;
                break;

            case "at":
                usp.at = fuzhi;
                break;

            case "guanzhu":
                usp.guanzhu = fuzhi;
                break;

            case "jubao":
                usp.jubao = fuzhi;
                break;

            case "zhuanfa":
                usp.zhuanfa = fuzhi;
                break;

            case "shoucang":
                usp.shoucang = fuzhi;
                break;

            case "fasong":
                usp.fasong = fuzhi;
                break;
            }
            return(bllusp.Update(usp));
        }