Example #1
0
        public ActionResult Create(ProjectSettingsAddVM model)
        {
            try
            {
                var newProjectSettings = new ProjectSettings
                {
                    EstimatedSPsum     = model.EstimatedSPsum,
                    EstimatedTeamSpeed = model.EstimatedTeamSpeed,
                    SprintAmount       = model.SprintAmount,
                    SprintLength       = model.SprintLength
                };

                if (ModelState.IsValid)
                {
                    _context.Add(newProjectSettings);
                    _context.SaveChanges();
                }

                return(RedirectToAction("Dashboard", "Account"));
            }
            catch
            {
                return(View());
            }
        }
Example #2
0
        public ActionResult RenderErrorIfSettingsAreEmpty()
        {
            var model = new ProjectSettingsAddVM();

            return(View(model));
        }