public void AddParentTask(SPAProjectManager.Entities.ParentTasks task) { SPAProjectManagerEntities mockContext = MockDataSetList(); var taskBL = new TaskBL(mockContext); taskBL.AddParentTask(task); }
public void AddParentTask(SPAProjectManager.Entities.ParentTasks pTask) { SPAProjectManager_DL.Parent_Task tk = new SPAProjectManager_DL.Parent_Task { //Parent_ID=pTask.ParentTaskID, ParentTask = pTask.Parent_Task }; _spaprojectManager.Parent_Task.Add(tk); _spaprojectManager.SaveChanges(); }
public IHttpActionResult AddParentTask([FromBody] SPAProjectManager.Models.ParentTasks task) { try { SPAProjectManager.Entities.ParentTasks tk = new SPAProjectManager.Entities.ParentTasks { //ParentTaskID=task.ParentTaskID, Parent_Task = task.ParentTask }; _taskBL.AddParentTask(tk); return(Ok()); } catch (Exception ex) { return(InternalServerError()); } }