Exemplo n.º 1
0
 public ActionResult AddNewMaterial(materials material)
 {
     if (applicationDAO.AddNewMaterial(material))
         return RedirectToAction("MaterialsList");
     else
     return View("AddNewMaterial");
 }
Exemplo n.º 2
0
 public bool AddNewMaterial(materials materials)
 {
     try
     {
         _entities.materials.Add(materials);
         _entities.SaveChanges();
     }
     catch
     {
         return false;
     }
     return true;
 }