Example #1
0
        public ActionResult SetScore(int id,FormCollection f)
        {
            int userID = UserID;
            bizBBSMain b = new bizBBSMain();
            BBSMain model = b.Get(id);
            int cha;
            if (model == null)
                return Redirect("/Home/AlertPage.html");
            if (!UserCommon.CheckBBSAdminRight(AdminType))
                return Redirect("/Home/AlertPage.html");

            bizUserScoreLog bu = new bizUserScoreLog();
            UserScoreLog modelUS = bu.Get(id, userID);
            List<UserScoreLog> listUS = bu.List(id);
            if (modelUS == null)
            {
                if (int.Parse(f["score"])!=0)
                    bu.Add(id, userID, UserName, int.Parse(f["score"]), f["remark"].Trim());
            }
            else
            {
                b.UserScoreCancel(id, userID);

            }
            TempData["Msg"]="�������óɹ�";
            return RedirectToAction("SetScore",new {id=id});
        }