Esempio n. 1
0
        public HttpResponseMessage GetTasks()
        {
            TasksBusiness       taskBusiness    = new TasksBusiness();
            List <ProjectTasks> listProjectTask = taskBusiness.GetTasks();

            return(Request.CreateResponse(HttpStatusCode.OK, listProjectTask));
        }
Esempio n. 2
0
 public TeamLeaderForm1()
 {
     InitializeComponent();
     _tasksBusiness   = new TasksBusiness();
     _tasks           = new Tasks();
     _projectBusiness = new ProjectBusiness();
     _stateBusiness   = new StateBusiness();
 }
Esempio n. 3
0
        public IHttpActionResult AddTask(Tasks task)
        {
            TasksBusiness taskManagerBusiness = new TasksBusiness();

            taskManagerBusiness.AddTask(task);

            return(CreatedAtRoute("DefaultApi", new { id = task.Task_ID }, task));
        }
Esempio n. 4
0
 public TestingSpecialistForm1()
 {
     InitializeComponent();
     _projectBusiness      = new ProjectBusiness();
     _tasksBusiness        = new TasksBusiness();
     _stateBusiness        = new StateBusiness();
     _tasks                = new Tasks();
     _employeeTaskBusiness = new EmployeeTasksBusiness();
     _employeeTask         = new EmployeeTasks();
     _employeeBusiness     = new EmployeeBusiness();
 }
 public BusinessAnalystForm1()
 {
     _taskBusiness         = new TasksBusiness();
     _projectBusiness      = new ProjectBusiness();
     _tasks                = new Tasks();
     _employeeBusiness     = new EmployeeBusiness();
     _employeeTasks        = new EmployeeTasks();
     _employeeTaskBusiness = new EmployeeTasksBusiness();
     _stateBusiness        = new StateBusiness();
     InitializeComponent();
 }
        public void GetTaskBusiness()
        {
            // Arrange

            var tasksBuiness = new TasksBusiness();
            List <ProjectTasks> listProjectTask;

            listProjectTask = tasksBuiness.GetTasks();

            Assert.AreEqual("Test", listProjectTask[0].Task1);
        }
Esempio n. 7
0
 public DeveloperForm1()
 {
     InitializeComponent();
     _tasksBusiness         = new TasksBusiness();
     _projectBusiness       = new ProjectBusiness();
     _stateBusiness         = new StateBusiness();
     _employee              = new Employee();
     _tasks                 = new Tasks();
     _state                 = new State();
     _employeeBusiness      = new EmployeeBusiness();
     _employeeTasksBusiness = new EmployeeTasksBusiness();
 }
Esempio n. 8
0
        // POST api/values
        public bool Post([FromBody] Task value)
        {
            bool status = false;

            try
            {
                TasksBusiness tasksBusiness = new TasksBusiness();
                tasksBusiness.CreateTask(value);
                status = true;
            }
            catch
            {
                status = false;
                throw;
            }

            return(status);
        }
        public void AddTaskBusiness()
        {
            // Arrange

            var   tasksBuiness = new TasksBusiness();
            Tasks tasks        = new Tasks
            {
                Task1 = "Test Tasks Business"
            };

            try
            {
                tasksBuiness.AddTask(tasks);
                Assert.IsTrue(true);
            }

            catch {
                Assert.IsTrue(false);
            }
        }
        //[System.Web.Http.HttpPost]
        //[ResponseType(typeof(ProjectManagerTasks))]
        //public IHttpActionResult AddTask(ProjectManagerTasks task)
        //{
        //    TasksBusiness taskManagerBusiness = new TasksBusiness();
        //    taskManagerBusiness.AddTask(task);

        //    return CreatedAtRoute("DefaultApi", new { id = task.Task_ID }, task);


        //}
        //public void AddTask([FromBody]ProjectManagerTasks task)
        //{
        //    TasksBusiness taskManagerBusiness = new TasksBusiness();
        //    taskManagerBusiness.AddTask(task);


        //}



        //public List<ProjectManagerTasks> GetTasks()
        //{
        //    TasksBusiness taskManagerBusiness = new TasksBusiness();
        //    return taskManagerBusiness.GetTasks();

        //}

        //public HttpResponseMessage GetTasks()
        //{
        //    TasksBusiness taskManagerBusiness = new TasksBusiness();
        //    List<ProjectManagerTasks> listTasks = taskManagerBusiness.GetTasks();

        //    return Request.CreateResponse(HttpStatusCode.OK, listTasks);

        //}

        //public JsonResult  Get()
        //{
        //    JsonResult result = new JsonResult();
        //    result.Data = new string[] { "values1,values2" };
        //    result.ContentType = "text/plain";
        //    return result;

        //   // return new string[] { "values1,values2" };

        //}

        //public ProjectManagerTasks GetTaskByTaskId(int taskId)
        //{
        //    TasksBusiness taskManagerBusiness = new TasksBusiness();
        //    return taskManagerBusiness.GetTaskByTaskId(taskId);
        //}

        // PUT api/tasks
        //public void UpdateTask([FromBody]ProjectManagerTasks task)
        //{
        //    TasksBusiness taskManagerBusiness = new TasksBusiness();
        //    taskManagerBusiness.UpdateTask(task);
        //}

        // DELETE api/tasks/5
        public void DeleteTask(int taskId)
        {
            TasksBusiness taskManagerBusiness = new TasksBusiness();

            taskManagerBusiness.DeleteTask(taskId);
        }
Esempio n. 11
0
        // GET api/values
        public IEnumerable <Task> Get()
        {
            TasksBusiness tasksBusiness = new TasksBusiness();

            return(tasksBusiness.GetTasks());
        }