Exemple #1
0
        public ActionResult FAdminApplyDeal1(int id)
        {
            if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSHighAdminRight(AdminType) == false)
                return RedirectToAction("FAdminAlert", new { id = id });
            int userID = int.Parse(Request.QueryString["userID"]);
            bizFactionUserLog blog = new bizFactionUserLog();
            blog.FactionApplyDeal(userID,UserName, id, 1);

            return RedirectToAction("FAdminApplyDeal", new { id = id });
        }
Exemple #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);
 }
Exemple #3
0
        /// <summary>
        /// ȡ�����벿������
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult FUnApply(int id)
        {
            //bizFaction bf = new bizFaction();
            bizFactionUserLog bfl = new bizFactionUserLog();
            FactionUserLog modelLog = bfl.GetByUserID(UserID);
            if(modelLog!=null)
                bfl.Delete(modelLog);

            return RedirectToAction("FApply", new { id = id });
        }
Exemple #4
0
        public ActionResult FExit(int id)
        {
            int userID = UserID;
            bizUsers bu = new bizUsers();
            bizFactionUserLog blog = new bizFactionUserLog();
            if ((new bizFactionDe()).GetByIsAdmin(id) == FactionDeID)
            {
                TempData["Msg"] = "���Dz��������������˳�";
                return Redirect("/Factions/FUsers/" + id + ".html");
            }
            Users model = bu.Get(userID);
            model.Attach();
            model.FactionID = 0;
            model.FactionDeID = 0;
            model.Detach();
            bu.Update(model);

            SessionSet(SessionName.FactionID, 0);
            SessionSet(SessionName.FactionDeID, 0);
            //UserCommon.RefreshUser();
            FactionUserLog modelLog = blog.GetCurrByUserID(userID);
            modelLog.Attach();
            modelLog.ExitTime = DateTime.Now;
            modelLog.Detach();
            blog.Update(modelLog);
            bizFactionLog bfl = new bizFactionLog();
            bfl.Add(id, model.UserName +" �˳�����");

            return Redirect("/Factions/FAdminAlert/" + id + ".html?result=��ɹ��˳�����");
        }
Exemple #5
0
        public ActionResult FApply(int id,FormCollection f)
        {
            int userID = UserID;
            bizFaction bf = new bizFaction();
            bizUsers bu = new bizUsers();
            Users modelUser = bu.Get(UserID);
            Faction model = bf.Get(id);
            ViewData["ID"] = id;
            if (modelUser.FactionID != 0)
            {
                TempData["Msg"] = "���Ѿ������˲��䣬����������";
                return RedirectToAction("FApply", new { id = id });
            }
            bizFactionUserLog bfl = new bizFactionUserLog();
            if (bfl.GetByUserID(userID) != null)
            {
                TempData["Msg"] = "���Ѿ��ύ�˼��벿������룬������������";
                return RedirectToAction("FApply", new { id = id });
            }
            FactionUserLog modelLog = new FactionUserLog();
            modelLog.FactionID = id;
            modelLog.UserID = userID;
            modelLog.ApplyDesc = f["ApplyDesc"].Trim();
            modelLog.ApplyTime = DateTime.Now;
            bfl.Add(modelLog);

            TempData["Msg"] = "���Ѿ��ɹ��ύ�����룬��ȴ�������������ˡ�";
            return RedirectToAction("FApply", new { id = id });
        }
Exemple #6
0
        public ActionResult FApply(int id)
        {
            bizFaction bf = new bizFaction();
            bizFactionUserLog bfl = new bizFactionUserLog();
            FactionUserLog modelLog = bfl.GetByUserID(UserID);
            ViewData["modelLog"] = modelLog;

            Faction model = bf.Get(id);
            ViewData["ID"] = id;
            return View(model);
        }