示例#1
0
        public void TestDict2TaskWrongResult()
        {
            Dictionary <string, string> task = new Dictionary <string, string>();

            Lifting_Hands_Backend.Persistence.Task result = Util.dict2Taks(task);
            Assert.IsTrue(result == null);
        }
示例#2
0
        /// <summary>
        /// Public method that calls the method Modify Task from the Task class.
        /// </summary>
        /// <param name="idTask"> Task ID, Tyoe INT </param>
        /// <param name="taskTable"> Table task, Type Persistance Task </param>
        ///

        public bool ModifyTask(int idTask, Persistence.Task taskTable)
        {
            Task task = new Task();

            Persistence.Task taskTable = new Persistence.Task();
            task.UpdateDBData(idTask, taskTable);
            return(true);
        }
示例#3
0
        /// <summary>
        /// Public method that calls the method Create task from the Task class.
        /// </summary>
        /// <param name="taskTable"> Table task, Type Persistance Task </param>
        ///
        public bool CreateTask(Persistence.Task taskTable)
        {
            Task task = new Task();

            Persistence.Task taskTable = new Persistence.Task();
            task.CreateTask(taskTable);
            return(true);
        }
示例#4
0
 static public Persistence.Task dict2Taks(Dictionary <string, string> task)
 {
     try
     {
         Persistence.Task taskData = new Persistence.Task();
         taskData.Task_Description = task["Description"];
         taskData.Task_Date        = DateTime.Parse(task["Date"]);
         taskData.Classroom_ID     = int.Parse(task["Classroom_ID"]);
         return(taskData);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message.ToString());
         return(null);
     }
 }
示例#5
0
 /// <summary>
 /// Public method that calls the method Create task from the Task class.
 /// </summary>
 /// <param name="taskTable"> Table task, Type Persistance Task </param>
 ///
 public bool CreateTask(Persistence.Task taskTable)
 {
     CRUD.Task task = new CRUD.Task();
     task.CreateTask(new Persistence.Task());
     return(true);
 }