예제 #1
0
 public void FactionCheckUpUnPass(int id)
 {
     bizFaction bf = new bizFaction();
     bizUsers bu = new bizUsers();
     bizUserMsg bm = new bizUserMsg();
     Faction model = bf.Get(id);
     Users modelUser = bu.Get(model.BuildUserID);
     bm.AddSysMsg(model.BuildUserID, "你提交的部落: [b]" + model.FName + "[/b] 的申请[color=red]没有通过审核[/color]。");
     bf.Delete(id);
 }
예제 #2
0
        public void Deal(int userReportID,int adminID,string adminName,string re,byte jiangliType)
        {
            bool giveJiangli = false ;
            bizUsers bu = new bizUsers();
            bizUserMsg bum = new bizUserMsg();
            UserReports model = Get(userReportID);
            Users modelUser = bu.Get(model.UserID);
            model.Attach();
            model.AdminID = adminID;
            model.AdminName = adminName;
            model.AdminRe = re;
            if (model.JiangliType == 0)
            {
                giveJiangli = true;
                model.JiangliType = jiangliType;
            }
            model.ReTime = DateTime.Now;
            model.Detach();
            Update(model);
            if (giveJiangli == true)
            {
                if (model.JiangliType == 1)
                {
                    modelUser.Attach();
                    modelUser.Jinbi += 200;
                    modelUser.Detach();
                    bu.Update(modelUser);
                    bum.AddSysMsg(model.UserID, "因为你的举报,系统奖励了你200吧币。");
                }
                if (model.JiangliType == 2)
                {
                    bizUserXCard buc = new bizUserXCard();
                    buc.AddCard(model.UserID, "bigqiqiu", 1);

                    bum.AddSysMsg(model.UserID, "因为你的举报,系统奖励了你1张强化气球卡。");
                }
            }
        }
예제 #3
0
        public string UsersJinbiDeal(string userName,string users, int factionID, int jinbi)
        {
            if (users == null)
                return "你没有选择用户";
            if (jinbi <= 0)
                return "派发的吧币不能为空或者负数";

            string[] userArray = users.Split(',');
            dalUsers du = new dalUsers();
            dalFaction df = new dalFaction();
            dalFactionLog dfl = new dalFactionLog();
            bizUserMsg bum = new bizUserMsg();
            Faction model = df.Get(factionID);
            if (model.FJinbi < userArray.Length * jinbi)
            {
                return "部落基金池没这么多基金(" + userArray.Length * jinbi + ")可以派发";
            }

            foreach (var item in userArray)
            {
                Users modelUser = du.Get(int.Parse(item));

                if (modelUser.FactionID == factionID)
                {
                    modelUser.Attach();
                    modelUser.Jinbi = modelUser.Jinbi + jinbi;
                    modelUser.Detach();
                    du.Update(modelUser);
                }

                dfl.Add(factionID, userName + " 从部落基金中派发了" + jinbi + "吧币给了 " + modelUser.UserName);
                bum.AddSysMsg(int.Parse(item), userName + " 从部落基金中派发了" + jinbi + "吧币给了你");

            }
            bizFaction bf = new bizFaction();
            Faction modelF = bf.Get(factionID);
            modelF.Attach();
            modelF.FJinbi = modelF.FJinbi - userArray.Length * jinbi;
            modelF.Detach();
            bf.Update(modelF);

            return "";
        }