Beispiel #1
0
 public ActionResult AddTestimonial(TestimonialModel model)
 {
     tbl_Testimonials testimonial = WebPagesService.SaveTestimonial(0, model.TestimonialDate, model.Client, model.Company, model.TestimonialContent);
     return Json(new { success = (testimonial != null), testimonialID = (testimonial != null ? testimonial.TestimonialID : 0) });
 }
Beispiel #2
0
        public ActionResult UpdateTestimonial(TestimonialModel model)
        {
            if (model.TestimonialID == 0)
                return Json(new { success = false });

            tbl_Testimonials testimonial = WebPagesService.SaveTestimonial(model.TestimonialID, model.TestimonialDate, model.Client, model.Company,
                model.TestimonialContent);
            return Json((testimonial != null) ?
                new { success = true, testimonialID = testimonial.TestimonialID } :
                new { success = false, testimonialID = 0 });
        }