Exemplo n.º 1
0
        public ActionResult show()
        {
            RegattaViewModel rvm = new RegattaViewModel();

            rvm.HandleRequest();

            return(View(rvm));
        }
Exemplo n.º 2
0
        public ActionResult Index(RegattaViewModel rvm)
        {
            rvm.IsValid = ModelState.IsValid;
            rvm.HandleRequest();

            if (rvm.IsValid)
            {
                ModelState.Clear();
            }
            else
            {
                foreach (KeyValuePair <string, string> item in rvm.ValidationErrors)
                {
                    ModelState.AddModelError(item.Key, item.Value);
                }
            }

            return(View(rvm));
        }