Example #1
0
        public ActionResult Edit(EditViewModel courseModel)
        {
            CultureInfo provider = CultureInfo.InvariantCulture;

            if (ModelState.IsValid)
            {
                this.repository.CourseUpdate(courseModel.Course, courseModel.GetArrayDates());
                this.TempData["message"] = string.Format("Изменения в курсе \"{0}\" были сохранены", courseModel.Course.Name);
                return(this.RedirectToAction("List"));
            }
            else
            {
                return(this.View(new EditViewModel
                {
                    Course = courseModel.Course
                }));
            }
        }