public ActionResult RaidersEdit(int id, FormCollection form)
        {
            var user    = GetCurrentUser();
            var raiders = UserRaidersBll.LoadEntities(ur => ur.Id == id && ur.UserId == user.Id).FirstOrDefault();

            raiders.Title    = form["title"];
            raiders.GameName = form["gamename"];
            raiders.Key      = form["keyword"];
            raiders.Msg      = form["area"];
            raiders.State    = "2";
            if (UserRaidersBll.Update(raiders))
            {
                return(Content("ok:恭喜,更新成功!请您等待审核!"));
            }
            else
            {
                return(Content("no:提示,更新失败!请稍候再试!"));
            }
        }
Ejemplo n.º 2
0
        public ActionResult Views(int id)
        {
            var raiders = UserRaidersBll.LoadEntities(n => n.Id == id).FirstOrDefault();

            if (raiders != null)
            {
                raiders.Views = raiders.Views == null ? 1 : raiders.Views + 1;
                if (UserRaidersBll.Update(raiders))
                {
                    return(Content("ok"));
                }
                else
                {
                    return(Content("no"));
                }
            }
            else
            {
                return(Content("noExist"));
            }
        }