public IActionResult EditGuestbook(FormCollection fc)
        {
            string id = fc["Id"];

            if (!Utils.IsInt(id) || int.Parse(id) <= 0)
            {
                tip.Message = "错误参数传递!";
                return(Json(tip));
            }

            Guestbook entity = Guestbook.FindById(int.Parse(id));

            if (entity == null)
            {
                tip.Message = "系统找不到本记录";
                return(Json(tip));
            }
            string kid = fc["KId"];

            if (Utils.IsInt(kid) && int.Parse(kid) != entity.KId)
            {
                entity.KId = int.Parse(kid);
            }
            string isverify = fc["IsVerify"];

            if (!string.IsNullOrEmpty(isverify) && isverify == "1")
            {
                entity.IsVerify = 1;
            }
            else
            {
                entity.IsVerify = 0;
            }
            string replayuser = fc["ReplyUser"];

            entity.ReplyNickName = replayuser;
            string reply = fc["Reply"];

            entity.ReplyContent = reply;
            if (!string.IsNullOrEmpty(entity.ReplyContent) && entity.ReplyAdminId == 0)
            {
                entity.ReplyAdminId = Core.Admin.GetMyInfo().Id;
                entity.ReplyIP      = Utils.GetIP();
                entity.ReplyAddTime = DateTime.Now;
            }
            entity.Update();
            Core.Admin.WriteLogActions("编辑审核留言(id:" + entity.Id + ");");
            tip.Status    = JsonTip.SUCCESS;
            tip.Message   = "编辑/审核留言详情成功";
            tip.ReturnUrl = "close";
            return(Json(tip));
        }
        public IActionResult EditGuestbook(int id)
        {
            IList <GuestbookCategory> list = GuestbookCategory.FindAll(GuestbookCategory._.Id > 0, GuestbookCategory._.Rank.Asc(), null, 0, 0);

            ViewBag.ListKinds = list;
            Guestbook entity = Guestbook.Find(Guestbook._.Id == id);

            if (entity == null)
            {
                return(EchoTipPage("系统找不到本记录!"));
            }
            if (entity.IsRead != 1)
            {
                entity.IsRead = 1;
                entity.Update();
            }

            Core.Admin.WriteLogActions("查看/回复留言(" + id + ");");

            return(View(entity));
        }