Example #1
0
        public JsonResult UpdateFeedBackStatus(string id, int status, string content)
        {
            bool flag = FeedBackBusiness.UpdateFeedBackStatus(id, status, content);

            JsonDictionary.Add("Result", flag ? 1 : 0);

            return(new JsonResult()
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #2
0
        public JsonResult GetFeedBackDetail(string id)
        {
            var item = FeedBackBusiness.GetFeedBackDetail(id);

            JsonDictionary.Add("Item", item);

            return(new JsonResult()
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #3
0
        /// <summary>
        /// 获取举报反馈信息
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="type"></param>
        /// <param name="status"></param>
        /// <param name="keyWords"></param>
        /// <param name="beginDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        public JsonResult GetFeedBacks(int pageIndex, int type, int status, string keyWords, string beginDate, string endDate)
        {
            int totalCount = 0, pageCount = 0;
            var list = FeedBackBusiness.GetFeedBacks(keyWords, beginDate, endDate, type, status, "", PageSize, pageIndex, out totalCount, out pageCount);

            JsonDictionary.Add("Items", list);
            JsonDictionary.Add("TotalCount", totalCount);
            JsonDictionary.Add("PageCount", pageCount);

            return(new JsonResult()
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #4
0
        public JsonResult GetFeedBacks(string keyWords, string beginDate, string endDate, int type, int status, int pageSize, int pageIndex)
        {
            int             totalCount = 0;
            int             pageCount  = 0;
            List <FeedBack> feedBacks  = FeedBackBusiness.GetFeedBacks(keyWords, CurrentUser.UserID, beginDate, endDate, type, status, pageSize, pageIndex, out totalCount, out pageCount);

            JsonDictionary.Add("items", feedBacks);
            JsonDictionary.Add("totalCount", totalCount);
            JsonDictionary.Add("pageCount", pageCount);
            return(new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public ActionResult Delete(int id, FormCollection formCollection)
        {
            try
            {
                var dbo = new FeedBackBusiness();
                dbo.PostDeleteMethod(id);


                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Example #6
0
        //
        // GET: /FeedBack/

        #region ajax
        public ActionResult InsertFeedBack(string entity)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            FeedBack             model      = serializer.Deserialize <FeedBack>(entity);

            model.CreateUserID = CurrentUser.UserID;

            bool flag = FeedBackBusiness.InsertFeedBack(model);

            JsonDictionary.Add("Result", flag?1:0);
            return(new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #7
0
        public JsonResult SaveFeedBack(string entity)
        {
            var    result = false;
            string msg    = "提交失败,请稍后再试!";

            if (CurrentUser == null)
            {
                msg = "您尚未登录,请登录后在操作!";
            }
            else
            {
                FeedBack model = JsonConvert.DeserializeObject <FeedBack>(entity);
                model.CreateUserID = CurrentUser.CreateUserID;
                result             = FeedBackBusiness.InsertFeedBack(model);
            }
            JsonDictionary.Add("result", result);
            JsonDictionary.Add("errorMsg", msg);
            return(new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public ActionResult CreateFeedBack(FeedBackViewModel model)
        {
            string feedback = "";

            try
            {
                var dbo = new FeedBackBusiness();
                feedback = System.Web.HttpContext.Current.Session["rate"].ToString();
                dbo.CreateMethod(model, feedback);
                //dbo.sSave();
                foreach (FeedBackViewModel dg in dbo.GetAll())
                {
                    ViewBag.Name = dg.Name;
                }

                TempData["message"] = "Data has been successfully submited";
                return(RedirectToAction("Index", "PatientView"));
            }
            catch (DataException)
            {
                return(View(model));
            }
        }
        public ActionResult Delete(int id)
        {
            var dbo = new FeedBackBusiness();

            return(View(dbo.GetDeleteMethod(id)));
        }
        public ActionResult Details(int?id)
        {
            var dbo = new FeedBackBusiness();

            return(View(dbo.DetailsMethod(id)));
        }
        public ActionResult CreateFeedBack()
        {
            var dbo = new FeedBackBusiness();

            return(View());
        }
        public ActionResult Index()
        {
            var model = new FeedBackBusiness();

            return(View(model.GetAll()));
        }
 public FeedBackController(FeedBackBusiness feedBackBusiness)
 {
     _feedBackBusiness = feedBackBusiness;
 }
 public HomeClientController(BindDataForClientHomePageBusiness bindDataForClientHomePageBusiness, FeedBackBusiness feedBackBusiness)
 {
     _bindDataForClientHomePageBusiness = bindDataForClientHomePageBusiness;
     _feedBackBusiness = feedBackBusiness;
 }