public TaskAssignmentCollection FetchAll()
 {
     TaskAssignmentCollection coll = new TaskAssignmentCollection();
     Query qry = new Query(TaskAssignment.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the assigned tasks.
        /// </summary>
        /// <returns></returns>
        public Collection <Task> GetAssigned()
        {
            Collection <Task>        collection     = new Collection <Task>();
            TaskAssignmentCollection dalAssignments = _taskAssignmentController.FetchAll();

#warning //TODO: optimize
            foreach (TaskAssignment taskAssignment in dalAssignments)
            {
                collection.Add(CreateRecord(taskAssignment.Task));
            }

            return(collection);
        }
Ejemplo n.º 3
0
        public Collection <Task> GetByUser(int devID)
        {
            Query query = TaskAssignment.CreateQuery().AddWhere(TaskAssignment.Columns.UserID, Comparison.Equals, devID);
            TaskAssignmentCollection assignmentCollection = _taskAssignmentController.FetchByQuery(query);

#warning //TODO: optimize
            Collection <Task> tasks = new Collection <Task>();
            foreach (TaskAssignment assignment in assignmentCollection)
            {
                tasks.Add(CreateRecord(assignment.Task));
            }

            return(tasks);
        }
 public TaskAssignmentCollection FetchByQuery(Query qry)
 {
     TaskAssignmentCollection coll = new TaskAssignmentCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
 public TaskAssignmentCollection FetchByID(object TaskID)
 {
     TaskAssignmentCollection coll = new TaskAssignmentCollection().Where("TaskID", TaskID).Load();
     return coll;
 }