예제 #1
0
        internal UserProject Edit(UserProject UserProject, string userIdentifier)
        {
            UserProject currentUserProject = getById(UserProject, userIdentifier);

            if (UserProject.Name == null)
            {
                UserProject.Name = currentUserProject.Name;
            }

            return(_projectRepo.Edit(UserProject));
        }
예제 #2
0
        public IActionResult Edit(Project project)
        {
            if (!ModelState.IsValid)
            {
                ModelState.AddModelError(string.Empty, "Something went wrong");
                return(View("Edit"));
            }

            projectrepo.Edit(project);
            return(View());
        }
예제 #3
0
        public ActionResult Edit([Bind(Include = "ID, ClientID, Status, Description, Title, Budget")] Project project)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    projects.Edit(project);
                    return(RedirectToAction("Index"));
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError(String.Empty, ex);
            }

            return(View(project));
        }
예제 #4
0
        public void Edit(Project project)
        {
            ProjectRepo projectRepository = new ProjectRepo();

            projectRepository.Edit(project);
        }
예제 #5
0
 public void EditAProject(Project project)
 {
     _repo.Edit(project);
 }