示例#1
0
        private void TaskToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            this.Hide();
            TaskCRUD Task = new TaskCRUD();

            Task.ShowDialog();
        }
        public void AddTaskCRUD()
        {
            // Arrange

            var   taskCRUD = new TaskCRUD();
            Tasks tasks    = new Tasks
            {
                Task1 = "Test Tasks Business"
            };

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

            catch
            {
                Assert.IsTrue(false);
            }
        }
        //public List<ProjectManagerTasks> GetProjectTasks()
        //{
        //    List<ProjectManagerTasks> listTaskModel = new List<ProjectManagerTasks>();
        //    TaskCRUD taskCrud = new TaskCRUD();
        //    listTaskModel = taskCrud.GetTasks();
        //    return listTaskModel;
        //}

        //public ProjectManagerTasks GetTaskByTaskId(int taskId)
        //{
        //    ProjectManagerTasks taskModel = new ProjectManagerTasks();
        //    TaskCRUD taskCrud = new TaskCRUD();
        //    taskModel = taskCrud.GetTaskByTaskId(taskId);
        //    return taskModel;


        //}
        //public void UpdateTask(ProjectManagerTasks task)
        //{
        //    TaskCRUD taskCrud = new TaskCRUD();
        //    taskCrud.UpdateTask(task);

        //}


        public void DeleteTask(int taskId)
        {
            TaskCRUD taskCrud = new TaskCRUD();

            taskCrud.DeleteTask(taskId);
        }
        public void AddTask(Tasks task)
        {
            TaskCRUD taskCrud = new TaskCRUD();

            taskCrud.AddTask(task);
        }