// DELETE api/<controller>/5 public IHttpActionResult Delete(int id) { bool res = dal.DeleteProject(id); if (res) { return(Ok()); } else { return(NotFound()); } }
public ActionResult Destroy(int ProjectId) { if (User.IsInRole("User")) { return(RedirectToAction("Index", "../Home")); } if (User.IsInRole("User")) { return(RedirectToAction("Index", "../Home")); } var project = BugReporter_v2.DAL.ProjectDAL.FindProject(ProjectId); RouteValueDictionary routeValues; if (project == null) { routeValues = this.GridRouteValues(); return(RedirectToAction("Index", routeValues)); } ProjectDAL.DeleteProject(ProjectId); routeValues = this.GridRouteValues(); return(RedirectToAction("Index", routeValues)); }
public ActionResult DeleteProject(ProjectVM project) { ProjectDAL.DeleteProject(Mapper.Map <ProjectDM>(project)); return(View()); }
public void DeleteProject(int projectId) { ProjectDAL projectDAL = new ProjectDAL(); projectDAL.DeleteProject(projectId); }