示例#1
0
 public Response <Task> AddTask(string email, string title, string desciption, DateTime dueTime) // add a new task for this user
 {
     log.Info(email + " attempting to add new task.");
     try
     {
         TC.Task task = BC.AddTask(email, title, desciption, dueTime);
         return(new Response <Task>(new Task(task.GetID(), task.GetCreation(), task.GetDue(), title, desciption, task.GetEmail())));
     }
     catch (Exception e) { return(new Response <Task>(e.Message)); }
 }
示例#2
0
 private Task ChengeType(TC.Task taskBL) // convert a BuisnessLayer task to a ServiceLayer task
 {
     return(new Task(taskBL.GetID(), taskBL.GetCreation(), taskBL.GetDue(), taskBL.GetTitle(), taskBL.GetDesc(), taskBL.GetEmail()));
 }