Exemplo n.º 1
0
        public ActionResult Edit(int id, [Bind(Include = "CourtNumber, SurfaceType, IsForDoubles, IsCovered, PriceH, Name")] Court court)
        {
            try
            {
                SqlCourt.AddModifyCourt(court);
                // TODO: Add update logic here

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View(court));
            }
        }
Exemplo n.º 2
0
        public ActionResult Create([Bind(Include = "CourtNumber, SurfaceType, IsForDoubles, IsCovered, PriceH, Name")] Court court)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    SqlCourt.AddModifyCourt(court);
                    return(RedirectToAction("Index"));
                }

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View(court));
            }
        }