Exemplo n.º 1
0
        public ActionResult Create()
        {
            var model = new CreateEventViewModel
                            {
                                // prepare the model for the first step
                                Create = new CreateEventViewModel.EventCreate()
                            };

            return PartialView(model);
        }
Exemplo n.º 2
0
        public ActionResult Create(CreateEventViewModel model)
        {
            if (!ModelState.IsValid)
                return PartialView(model);

            if (model.Create != null)
            {
                model.Create = null;
                // prepare the model for the next step
                model.Invite = new CreateEventViewModel.EventInvite();
            }

            else if (model.Invite != null)
            {
                model.Invite = null;
            }

            return PartialView(model);
        }