Пример #1
0
        public ActionResult Reply(int consultId = -1)
        {
            ProductConsultInfo productConsultInfo = AdminProductConsults.AdminGetProductConsultById(consultId);
            if (productConsultInfo == null)
                return PromptView("商品咨询不存在");
            if (productConsultInfo.StoreId != WorkContext.StoreId)
                return PromptView("不能回复其它店铺的商品咨询");

            ReplyProductConsultModel model = new ReplyProductConsultModel();
            model.ProductConsultInfo = productConsultInfo;
            model.ReplyMessage = productConsultInfo.ReplyMessage;

            ViewData["referer"] = MallUtils.GetStoreAdminRefererCookie();
            return View(model);
        }
Пример #2
0
        public ActionResult Reply(ReplyProductConsultModel model, int consultId = -1)
        {
            ProductConsultInfo productConsultInfo = AdminProductConsults.AdminGetProductConsultById(consultId);
            if (productConsultInfo == null)
                return PromptView("商品咨询不存在");
            if (productConsultInfo.StoreId != WorkContext.StoreId)
                return PromptView("不能回复其它店铺的商品咨询");

            if (ModelState.IsValid)
            {
                AdminProductConsults.ReplyProductConsult(consultId, WorkContext.Uid, DateTime.Now, model.ReplyMessage, WorkContext.NickName, WorkContext.IP);
                AddStoreAdminLog("回复商品咨询", "回复商品咨询,商品咨询为:" + consultId);
                return PromptView("商品咨询回复成功");
            }

            model.ProductConsultInfo = productConsultInfo;
            ViewData["referer"] = MallUtils.GetStoreAdminRefererCookie();
            return View(model);
        }