示例#1
0
        public ActionResult Create(Course course)
        {
            if (ModelState.IsValid)
            {
                db.create(course);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(course);
        }
示例#2
0
 public Course edit(Course course)
 {
     return new JavaScriptSerializer().Deserialize<Course>(
     new Enlace().EjecutarAccion(url + "/" + course.ID.ToString() + data, "PUT", course));
 }
示例#3
0
 //
 public Course create(Course courses)
 {
     return new JavaScriptSerializer().Deserialize<Course>(
     new Enlace().EjecutarAccion(url + ".json", "POST", courses));
 }
示例#4
0
 public ActionResult Edit(Course course)
 {
     db.edit(course);
     return View(course);
 }