public ActionResult CreateOrEdit(Product product)
        {
            if (this.ModelState.IsValid)
            {
                productService.CreateOrEditProduct(product);
                return(RedirectToAction("Index"));
            }

            ViewBag.UnityTypes = new SelectList(unityTypeService.GetUnityTypes(), "UnityTypeId", "Description");

            return(View("Form", product));
        }
        public ActionResult CreateOrEdit(Tools tools)
        {
            if (this.ModelState.IsValid)
            {
                tools = toolsService.CreateOrEditTools(tools);
                return(RedirectToAction("Index"));
            }

            ViewBag.UnityTypes = new SelectList(unityTypeService.GetUnityTypes(), "UnityTypeId", "Description");

            return(View("Form", tools));
        }
        public ActionResult CreateOrEdit(Material material)
        {
            if (this.ModelState.IsValid)
            {
                material = materialService.CreateOrEditMaterial(material);
                return(RedirectToAction("Index"));
            }

            ViewBag.UnityTypes = new SelectList(unityTypeService.GetUnityTypes(), "UnityTypeId", "Description");

            return(View("Form", material));
        }
        public IActionResult Index()
        {
            var unityTypes = unityTypeService.GetUnityTypes();

            return(View(unityTypes));
        }