Example #1
0
        public ActionResult Add(Feedback feedback)
        {
            if (ModelState.IsValid)
            {
                var flag = FeedBackService.Add(feedback);

                if (flag != 0)
                {
                   // Response.Redirect("<script>alert('增加成功')</script>");
                }
                return RedirectToAction("List");
            }

            return View();
        }
Example #2
0
 public JsonResult Save(Feedback feedback, FormCollection formCollection)
 {
     var result = 0;
     feedback.CreateDate = DateTime.Now;
     var flag = FeedBackService.Add(feedback) > 0;
     if (flag)
     {
         result = 1;
     }
     // return "aa";
     return Json(result);
 }