示例#1
0
        public IActionResult Edit(Logica.Models.BindingModel.ProjectsEditBindingModel model)
        {
            if (ModelState.IsValid)
            {
                Logica.BL.Projects project = new Logica.BL.Projects();
                project.UpdateProjects(model.Id, model.Title, model.Details, model.ExpectedCompletionDate);

                return(RedirectToAction("Index"));
            }
            return(View(model));
        }
示例#2
0
        public IActionResult Edit(int?id)
        {
            Logica.BL.Projects projects = new Logica.BL.Projects();
            var project             = projects.GetProjects(id, null).FirstOrDefault();
            var projectBindingModel = new Logica.Models.BindingModel.ProjectsEditBindingModel
            {
                Id      = project.Id,
                Details = project.Details,
                Title   = project.Title,
                ExpectedCompletionDate = project.ExpectedCompletionDate
            };

            return(View(projectBindingModel));
        }