public IHttpActionResult put(tblParent item) { ProjectBAL obj = new ProjectBAL(); obj.UpdateParentTask(item); return(Ok("Record Updated")); }
public IHttpActionResult Delete(int id) { ProjectBAL obj = new ProjectBAL(); obj.Deleteparenttask(id); return(Ok("Record is deleted")); }
public IHttpActionResult post(tblParent item) { ProjectBAL obj = new ProjectBAL(); obj.AddParentTask(item); return(Ok("Record added")); }
public IHttpActionResult put(int id) { ProjectBAL obj = new ProjectBAL(); obj.Endtask(id); return(Ok("Record is deleted")); }
public IHttpActionResult put(int id) { ProjectBAL obj = new ProjectBAL(); obj.Suspendtask(id); return(Ok("Record Updated")); }
public IHttpActionResult put(tblUser item) { ProjectBAL obj = new ProjectBAL(); obj.UpdateUser(item); return(Ok("Record Updated")); }
public IHttpActionResult Get() { ProjectBAL obj = new ProjectBAL(); return(Ok(obj.GetUser())); }
public void Getall() { ProjectBAL obj = new ProjectBAL(); int count = obj.GetTask().Count(); Assert.Greater(count, 0); }
public IHttpActionResult Get() { ProjectBAL obj = new ProjectBAL(); List <tblProject> projects = obj.GetProject(); return(Ok(projects)); }
public ActionResult GetAllProjects() { IProjectBAL projectBAL = new ProjectBAL(); GetAllProjectsRequest request = new GetAllProjectsRequest(); var response = projectBAL.GetAllProjects(request); return(Json(response)); }
public IHttpActionResult post(tblUser item) { ProjectBAL obj = new ProjectBAL(); obj.AddUser(item); // obj.AddProject(item1); return(Ok("Record added")); }
public IHttpActionResult Get(int id) { if (id == 0) { return(null); } ProjectBAL obj = new ProjectBAL(); return(Ok(obj.GetparenttaskbyId(id))); }
public ActionResult ListItemsByProject(string ProjectName) { IProjectBAL projectBAL = new ProjectBAL(); ListItemsByProjectRequest request = new ListItemsByProjectRequest(); request.ProjectName = ProjectName; ListItemsByProjectResponse response = projectBAL.ListItemsByProject(request); return(Json(response)); }
public void Getbytask() { ProjectBAL obj = new ProjectBAL(); List <tblTask> Ts = obj.GetTask(); //Task count = obj.GetTaskbyId(1); tblTask count = obj.GetTaskbyId(Ts[0].TaskId); Assert.IsNotNull(count); // Assert.Greater(count, 0); }
public ActionResult CreateProject(string ProjectName, string Host, string Username, string Password, string Database) { IProjectBAL projectBAL = new ProjectBAL(); CreateProjectRequest request = new CreateProjectRequest(); request.project.ProjectName = ProjectName; request.project.Host = Host; request.project.Username = Username; request.project.Password = Password; request.project.Database = Database; var response = projectBAL.CreateProject(request); return(Json(response)); }
public void DeleteTask() { ProjectBAL obj = new ProjectBAL(); List <tblTask> Ts = obj.GetTask(); tblTask Taskgetbyid = obj.GetTaskbyId(Ts[0].TaskId); int count1 = obj.GetTask().Count(); //dynamic testtask = new (Task) list<Task>; //Task T = (new Task { TaskId = 1015, ParentName = "ParentTaskstest", TaskName = "Testtaskname", Priority = 15, SDate = DateTime.Now, EDate = DateTime.Now }); obj.DeleteTask(Taskgetbyid.TaskId); int count2 = obj.GetTask().Count(); Assert.AreEqual(count2, count1 - 1); }
public void AddTask() { ProjectBAL obje = new ProjectBAL(); int count = obje.GetTask().Count(); //dynamic testtask = new (Task) list<Task>; tblTask T = (new tblTask { TaskName = "Testtaskname", TStartDate = DateTime.Now, TEndDate = DateTime.Now, TPriority = 10, TStatus = false, ParentTaskName = "parenttask", UserId = 1 }); obje.AddTask(T); int count1 = obje.GetTask().Count(); Assert.AreEqual(count1, count + 1); }
public void updateTask() { ProjectBAL obj = new ProjectBAL(); List <tblTask> Ts = obj.GetTask(); tblTask Taskgetbyid = obj.GetTaskbyId(Ts[0].TaskId); int count = obj.GetTask().Count(); //dynamic testtask = new (Task) list<Task>; tblTask T = (new tblTask { TaskId = Ts[0].TaskId, TaskName = "taskname", TStartDate = DateTime.Now, TEndDate = DateTime.Now, TPriority = 10, TStatus = false, ParentTaskName = "parenttask", UserId = 1 }); obj.UpdateTask(T); int count1 = obj.GetTask().Count(); List <tblTask> TS1 = obj.GetTask(); Assert.AreEqual(count1, count); // Assert.AreEqual(T.TaskName, TS1[0].TaskName); }
public IHttpActionResult Get() { ProjectBAL obj = new ProjectBAL(); return(Ok(obj.GetParentTask())); }
public IHttpActionResult Get(int id) { ProjectBAL obj = new ProjectBAL(); return(Ok(obj.GetUserbyId(id))); }