public ActionResult AddMaterial(Material material) { MaterialRESTService m = new MaterialRESTService(); m.PostMaterial(material); return(RedirectToAction("Index")); }
public ActionResult DeleteMaterial(int id, string __RequestVerificationToken) { MaterialRESTService m = new MaterialRESTService(); m.DeleteMaterial(id); return(RedirectToAction("Index")); }
public ActionResult EditMaterial(int id, Material material) { MaterialRESTService m = new MaterialRESTService(); m.PutMaterial(material); return(RedirectToAction("DetailsMaterial", new { id = id })); }
public ActionResult DeleteMaterial(int id) { MaterialRESTService m = new MaterialRESTService(); Material material = m.getMaterial(id); return(View(material)); }
// GET: Material public ActionResult Index() { MaterialRESTService m = new MaterialRESTService(); List <Material> listMaterial = m.getMaterials(); return(View(listMaterial)); }