コード例 #1
0
        public ActionResult AddColour()
        {
            var colour = new NewColour();
            colour.ColourGroups = cat.GetColourGroups();

            return View(colour);
        }
コード例 #2
0
        public ActionResult AddColour(NewColour colour)
        {
            cat.AddNewColour(colour.Colour);
            cat.Save();
            ViewBag.Message = "You have successfully added this colour:" + colour.Colour.Title;

            return View(colour);
        }