public void TestDict2TaskWrongResult() { Dictionary <string, string> task = new Dictionary <string, string>(); Lifting_Hands_Backend.Persistence.Task result = Util.dict2Taks(task); Assert.IsTrue(result == null); }
/// <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); }
/// <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); }
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); } }
/// <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); }