public ActionResult Details(int id = 0)
 {
     professors professor = new professors();
     professor = db.find(id);
     if (professor == null)
     {
         return HttpNotFound();
     }
     return View(professor);
 }
        public ActionResult Create(professors professors)
        {
            if (ModelState.IsValid)
            {
                db.create(professors);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(professors);
        }
Exemple #3
0
 //
 public professors edit(professors professor)
 {
     return new JavaScriptSerializer().Deserialize<professors>(
     new Enlace().EjecutarAccion(url + "/" + professor.ID.ToString() + data, "PUT", professor));
 }
Exemple #4
0
 //
 public professors create(professors professor)
 {
     return new JavaScriptSerializer().Deserialize<professors>(
     new Enlace().EjecutarAccion(url + ".json", "POST", professor));
 }
 public ActionResult Edit(professors professors)
 {
     db.edit(professors);
     return View(professors);
 }
 //
 // GET: /professor/Edit/5
 public ActionResult Edit(int id = 0)
 {
     professors professors = new professors();
     professors = db.find(id);
     return View(professors);
 }
 //
 // GET: /professor/Delete/5
 public ActionResult Delete(int id = 0)
 {
     professors professor = new professors();
     professor = db.find(id);
     return View(professor);
 }