Esempio n. 1
0
        public ActionResult AddMaterial(Material material)
        {
            MaterialRESTService m = new MaterialRESTService();

            m.PostMaterial(material);
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public ActionResult DeleteMaterial(int id, string __RequestVerificationToken)
        {
            MaterialRESTService m = new MaterialRESTService();

            m.DeleteMaterial(id);
            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
        public ActionResult EditMaterial(int id, Material material)
        {
            MaterialRESTService m = new MaterialRESTService();

            m.PutMaterial(material);
            return(RedirectToAction("DetailsMaterial", new { id = id }));
        }
Esempio n. 4
0
        public ActionResult DeleteMaterial(int id)
        {
            MaterialRESTService m        = new MaterialRESTService();
            Material            material = m.getMaterial(id);

            return(View(material));
        }
Esempio n. 5
0
        // GET: Material
        public ActionResult Index()
        {
            MaterialRESTService m            = new MaterialRESTService();
            List <Material>     listMaterial = m.getMaterials();

            return(View(listMaterial));
        }