public virtual ActionResult DestroyDependency( [DataSourceRequest] DataSourceRequest request, ProjectDetailsDependencyViewModel dep) { if (dep != null) { this.subTaskService.DeleteDependency(dep.Id); } return(this.Json(dep)); }
public virtual ActionResult CreateDependency( [DataSourceRequest] DataSourceRequest request, ProjectDetailsDependencyViewModel dep) { if (dep != null) { this.subTaskService.AddDependency( new SubTaskDependency() { SuccessorId = dep.SuccessorId, PredecessorId = dep.PredecessorId, Type = dep.Type }); } return this.Json(dep); }
public virtual ActionResult CreateDependency( [DataSourceRequest] DataSourceRequest request, ProjectDetailsDependencyViewModel dep) { if (dep != null) { this.subTaskService.AddDependency( new SubTaskDependency() { SuccessorId = dep.SuccessorId, PredecessorId = dep.PredecessorId, Type = dep.Type }); } return(this.Json(dep)); }
public virtual JsonResult UpdateDependency( [DataSourceRequest] DataSourceRequest request, ProjectDetailsDependencyViewModel dep) { if (dep != null) { var depDb = this.subTaskService.AllDependencies().FirstOrDefault(x => x.Id == dep.Id); if (depDb != null) { depDb.PredecessorId = dep.PredecessorId; depDb.SuccessorId = dep.SuccessorId; depDb.Type = dep.Type; this.subTaskService.UpdateDependency(depDb); } } return(this.Json(dep)); }
public virtual JsonResult UpdateDependency( [DataSourceRequest] DataSourceRequest request, ProjectDetailsDependencyViewModel dep) { if (dep != null) { var depDb = this.subTaskService.AllDependencies().FirstOrDefault(x => x.Id == dep.Id); if (depDb != null) { depDb.PredecessorId = dep.PredecessorId; depDb.SuccessorId = dep.SuccessorId; depDb.Type = dep.Type; this.subTaskService.UpdateDependency(depDb); } } return this.Json(dep); }
public virtual ActionResult DestroyDependency( [DataSourceRequest] DataSourceRequest request, ProjectDetailsDependencyViewModel dep) { if (dep != null) { this.subTaskService.DeleteDependency(dep.Id); } return this.Json(dep); }