Example #1
0
 public ActionResult FUsers(int id)
 {
     bizUsers bu = new bizUsers();
     bizFaction bf = new bizFaction();
     bizFactionDe bfd = new bizFactionDe();
     List<Users> listUser = bu.ListByFaction(id);
     ViewData["ID"] = id;
     ViewData["FactionID"] = FactionID;
     return View();
 }
Example #2
0
 public ActionResult FAdminApplyDeal(int id)
 {
     if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSHighAdminRight(AdminType) == false)
         return RedirectToAction("FAdminAlert", new { id = id });
     bizFaction bf = new bizFaction();
     bizFactionDe bfd = new bizFactionDe();
     bizFactionUserLog blog = new bizFactionUserLog();
     List<FactionUserLog> list = blog.ListByFactionID(id);
     ViewData["ID"] = id;
     return View(list);
 }
Example #3
0
 public ActionResult FAdminDeUsers(int id)
 {
     if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSHighAdminRight(AdminType) == false)
         return RedirectToAction("FAdminAlert", new { id = id });
     int deID = int.Parse(Request.QueryString["deid"].ToString());
     bizFaction bf=new bizFaction();
     bizFactionDe bfd = new bizFactionDe();
     bizUsers bu = new bizUsers();
     Faction model = bf.Get(id);
     FactionDe modelDe = bfd.Get(deID);
     List<FactionDe> listDe = bfd.ListByID(id);
     List<Users> listUser = bu.ListByFaction(id, deID);
     ViewData["ID"] = id;
     ViewData["Faction"] = model;
     ViewData["FactionDe"] = modelDe;
     ViewData["listDe"] = listDe;
     return View(listUser);
 }
Example #4
0
 public ActionResult FAdminDeUsers(int id,FormCollection f)
 {
     if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSHighAdminRight(AdminType) == false)
         return RedirectToAction("FAdminAlert", new { id = id });
     int deID = int.Parse(Request.QueryString["deid"].ToString());
     string users = f["user"];
     string btn = f["btn"];
     int otherFunctionDe = int.Parse(f["factionDe"]);
     bizFactionDe bfd = new bizFactionDe();
     string result=bfd.UsersDeal(btn, users,id, otherFunctionDe);
     if (result != "")
         TempData["Msg"] = result ;
     return Redirect("/Factions/FAdminDeUsers/" + id + ".html?deID=" + deID);
 }
Example #5
0
 public ActionResult FAdminDeMod(int id, FormCollection f)
 {
     if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSHighAdminRight(AdminType) == false)
         return RedirectToAction("FAdminAlert", new { id = id });
     if (int.Parse(f["Orders"].Trim()) < 1 || int.Parse(f["Orders"].Trim()) > 99)
     {
         TempData["Msg"] = "���Ӧ��1-99֮��";
     }
     int deID = int.Parse(Request.QueryString["deID"].ToString());
     bizFaction bf = new bizFaction();
     bizFactionDe bfd = new bizFactionDe();
     FactionDe modelDe = bfd.Get(id, deID);
     modelDe.Attach();
     modelDe.FTitle = f["FTitle"].Trim();
     if(modelDe.IsAdmin==0&&modelDe.IsDefault==0)
         modelDe.Orders = int.Parse(f["Orders"].Trim());
     modelDe.Detach();
     bfd.Update(modelDe);
     MyCache.BBSCache.ListFactionDeReLoad();
     return Redirect("/Factions/FAdminDe/"+ id +".html?deID="+deID);
 }
Example #6
0
        public ActionResult FAdminDeMod(int id)
        {
            if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSHighAdminRight(AdminType) == false)
                return RedirectToAction("FAdminAlert", new { id = id });
            int deID = int.Parse(Request.QueryString["deID"].ToString());
            bizFaction bf = new bizFaction();
            bizFactionDe bfd = new bizFactionDe();
            FactionDe modelDe = bfd.Get(id, deID);
            ViewData["ID"] = id;

            return View(modelDe);
        }
Example #7
0
 public ActionResult FAdminDeDelete(int id)
 {
     if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSHighAdminRight(AdminType) == false)
         return RedirectToAction("FAdminAlert", new { id = id });
     int deID = int.Parse(Request.QueryString["deid"].ToString());
     bizFactionDe bfd = new bizFactionDe();
     bizUsers bu = new bizUsers();
     FactionDe model = bfd.Get(deID);
     if (model.IsAdmin == 1 || model.IsDefault == 1)
     {
         TempData["Msg"] = "�÷�Ų���ɾ��";
         return Redirect("/Factions/FAdminDe/" + id + ".html");
     }
     if (bu.ListByFaction(id, deID).Count >0)
     {
         TempData["Msg"] = "�÷�����г�Ա������ɾ��";
         return Redirect("/Factions/FAdminDe/" + id + ".html");
     }
     bfd.DeleteByDeID(deID, id);
     MyCache.BBSCache.ListFactionDeReLoad();
     return Redirect("/Factions/FAdminDe/" + id + ".html");
 }
Example #8
0
 public ActionResult FAdminDeAdd(int id,FormCollection f)
 {
     if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSHighAdminRight(AdminType) == false)
         return RedirectToAction("FAdminAlert", new { id = id });
     if (f["FTitle"].Trim() == "")
     {
         TempData["Msg"] = "�����������";
         return RedirectToAction("FAdminDeAdd", new {id=id });
     }
     if (int.Parse(f["Orders"].Trim()) <= 1 || int.Parse(f["Orders"].Trim()) >= 99)
     {
         TempData["Msg"] = "���Ӧ��1-99֮��";
     }
     bizFaction bf = new bizFaction();
     bizFactionDe bfd = new bizFactionDe();
     FactionDe modelDe = new FactionDe();
     modelDe.FactionID = id;
     modelDe.FTitle = f["FTitle"].Trim();
     modelDe.Orders = int.Parse(f["Orders"].Trim());
     bfd.Add(modelDe);
     MyCache.BBSCache.ListFactionDeReLoad();
     return RedirectToAction("FAdminDe", new { id = id });
 }
Example #9
0
 public ActionResult FAdminDe(int id)
 {
     if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSHighAdminRight(AdminType) == false)
         return RedirectToAction("FAdminAlert", new { id = id });
     bizFaction bf = new bizFaction();
     bizFactionDe bfd = new bizFactionDe();
     Faction model = bf.Get(id);
     List<FactionDe> list = bfd.ListByID(id);
     ViewData["ID"] = id;
     return View(list);
 }