Exemplo n.º 1
0
        public ActionResult EditFeedBack(FeedBackModel model, int Id = -1)
        {
            FeedBackInfo feedBackInfo = FeedBack.GetFeedBackById(Id);

            if (feedBackInfo == null)
            {
                return(PromptView("信息反馈信息不存在"));
            }

            if (ModelState.IsValid)
            {
                feedBackInfo.Tag     = model.Tag;
                feedBackInfo.LinkMan = model.LinkMan;
                feedBackInfo.Tel     = model.Tel;
                feedBackInfo.Mobile  = model.Mobile;
                feedBackInfo.Email   = model.Email;
                feedBackInfo.Title   = model.Title;
                feedBackInfo.Body    = model.Body;
                feedBackInfo.Reply   = model.Reply;
                feedBackInfo.State   = model.State;
                feedBackInfo.IsOut   = model.IsOut;

                if (model.State.Equals(1))
                {
                    feedBackInfo.ReplyTime = DateTime.Now;
                }

                FeedBack.UpdateFeedBackInfo(feedBackInfo);

                return(PromptView("信息反馈修改成功"));
            }
            ViewData["referer"] = SiteUtils.GetAdminRefererCookie();
            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult EditFeedBack(int Id = -1)
        {
            FeedBackInfo feedBackInfo = FeedBack.GetFeedBackById(Id);

            if (feedBackInfo == null)
            {
                return(PromptView("信息反馈信息不存在"));
            }

            FeedBackModel model = new FeedBackModel
            {
                Id             = feedBackInfo.Id,
                FeedBackTypeId = feedBackInfo.FeedBackTypeId,
                Tag            = feedBackInfo.Tag,
                LinkMan        = feedBackInfo.LinkMan,
                Tel            = feedBackInfo.Tel,
                Mobile         = feedBackInfo.Mobile,
                Email          = feedBackInfo.Email,
                Title          = feedBackInfo.Title,
                Body           = feedBackInfo.Body,
                AddTime        = feedBackInfo.AddTime,
                Reply          = feedBackInfo.Reply,
                ReplyTime      = feedBackInfo.ReplyTime,
                State          = feedBackInfo.State,
                IsOut          = feedBackInfo.IsOut,
                Ip             = feedBackInfo.Ip,
                SearchKey      = feedBackInfo.SearchKey
            };

            ViewData["referer"] = SiteUtils.GetAdminRefererCookie();
            return(View(model));
        }