Exemplo n.º 1
0
        public IActionResult UpdateProjectContributor(int ProjectMemberId)
        {
            var contributorUpdate = new UpdateContributor
            {
                projectMemberId = ProjectMemberId,
            };

            return(View(contributorUpdate));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> UpdateProjectContributor(UpdateContributor Input)
        {
            if (ModelState.IsValid)
            {
                var result = await gsv.UpdateContributor(Input.projectMemberId, Input.update);

                if (result != null)
                {
                    TempData["submission"] = "User updated succesfully!";
                    TempData["AlertType"]  = "alert-success";

                    return(RedirectToAction("viewprojects"));
                }
            }
            ViewBag.submission = "User not updated!";
            ViewBag.AlertType  = "alert-danger";

            return(View(Input));
        }