task

[ CLASS -  /App_Code/Task.cs ]

[WHAT]

  1. ] Task.cs - documenting properties, constructors, methods and ... for this application component 

[WHY]

  1. ] class to work with Task objects,
  2. [ args ] none[, id, ...] 

[WHERE]

  1. [USING]
    1. ] System
    2. ] System.Collections.Generic // for ieNumerable, used by ...
    3. ] System Dynamic // for Dynamic types, used by ..
    4. ] System.Web // for httpContext, used by ... to access Session var ( get current_db)
    5. ] WebMatrix.Data // for Database methods, used by ... ] all
    6. ] WebMatrix.Data.StronglyTyped // for data library ST that converts dynamics to ST objects
  2. [PROPERTIES]
    1. x] id_task = value autogenerated by db table
    2. x] name_task =
    3. x] description_task =
    4. x] parent_id =
    5. x]] start_time =
    6. x]] duration =
    7. ] est completion time = 
    8. x]] priority
    9. x] photo
    10. x] status
    11. x] content_task
    12. x] content_format
    13. *] count
    14. ] O Taskgroup
    15. ] O Plan
    16. ] O Calendar
    17. ] database
    18. ] [qryGet]
    19. ] [qryFind]
    20. ] [qryAdd]
    21. ] [qryDelete]
    22. ] [qryEdit]
  3. [CONSTRUCTORS]
    1. x] Task() - default empty Task
    2. x] Task(id) - by id - generate and instantiate an instance of a Task object using the id of the existing desired task
    3. ] Task(name) - by name - instantiate an instance of a Task object using the name of the existing desired task
    4. OR 3] Task(string name) - instantiates a new instance of Task object with the provided nam
    5. ] Task (int id,string name, ...) - instantiates a new instance of a Task object with the provided properties
  4. [METHODS]
    1. static add(args[])
    2. static edit(args[])
    3. import()
    4. ***
    5. x] GetAllTasks() - STATIC - USED on PG view/index, item = view-All-tasks
    6. x] GetTasksInTaskGroup() STATIC - USED on PG view/tasks, - default
    7. x] GetTaskById()
    8. x] getTasksByName - 
    9. x] getTasksByDescription -
    10. x] getTasksInCalendar -
    11. x] getTasksInPlan -
    12. ] getTasksByStartDate -
    13. ] getTasksByDuration -
    14. ] getTasksByPriority - 
    15. ] getTasksByStatus - 
    16. ] getTasksByContent -    
    17. [ADD]
    18. ] add(name, description) -
    19. x] delete() to delete a task object that has already been instantiated
    20. x] delete(id) STATIC method to delete an existing task object given its id value
    21. x] edit() - updates the values of the user record based on the values in the current instance,
    22. x] edit(id) - STATIC - method to update an existing task given its id value
    23. ] edit(name,description)
    24. [EDITS]
    25. x] setTasksName(name, ids) - sets all user selected tasks "names" to the given name
    26. x] setTasksDescription(description, ids) - sets all user selected tasks "descriptions" to the given description
    27. x] setTasksStartTime(cogs, ids) - sets all user selected tasks "cogs" to the given value
    28. x] setTasksDuration(quantity, ids) - sets all user selected tasks "quantity" to the given value
    29. x] setTasksStatus(status, ids) - sets all tasks to the given status
    30. ] setTasksPriority()
    31. ] Photo
    32. ] Content
    33. ] ContentFormat
    34. ] owner
    35. [OTHER]
    36. ] getUser(id) -
    37. x] getMaxId() -
    38. ] getDefaultTaskId()

[WHERE]

  1. [ called from] 
    1. ]   

[WHEN]

  1. ]

[EXAMPLE]

[HOW-TO]

  1. ]

[REFERENCE]

  1. ] CLASS Article.cs

developer implementation

[.process]

  1.  

[.notes]

  1.  x] have a "contents" header in the .cs file which contains contents of the class (properties, methods, ...), I SHOULD do the work here, and then update that contents header with it
  2. OR ] use a tool like visual studio to produce the api documentation,
  3. PROPERTIES LIST - LEGEND
    1. ]] = unique to this
    2. * = property not persisted
    3. O preface = property is an object
  4.  ] REF # 2394 for details on  1] USING statements, 2] PROPERTIES - CLASS, 3] CONSTRUCTORS - 4] METHODS - CRUD 5] METHODS - OTHER

status 

[previously]

  1. [2012-06-10] NEW task
    1. ] FILE - Task.cs - added, based on Item.cs
    2. ] PG Record - Task.cs - added,(this)
  2. [2012-06-29]
    1. x] build Task class using Item.cs as a template,  x] removed Positions class
  3. [2012-07-09]
    1. X] (id=2394) Task.cs
    2. x] updated to priority and owner fields IF null THEN set value OR else get ERROR 
  4. [2012-09-23] NEW task IN
    1. ] ADDED
  5. [2013-05-13] NEW task 
    1. x] ADDED created field
  6. [2013-08-22] NEW task
    1. x] ADD method copy
  7. [2013-06-10]
    1. *] TASK is start_time(DT) NOT start_date(DT) like others
    2. x] CHECK - SET Datetime.now  IF default-dateTime = '2012-10-31 21:19:02'
    3. *] default date is SET where = ???
    4. x] CHECK - TASK owner if 0 then 1, if => 1 then value 
  8. [2013-mm-dd]
    1. ] + derived property = end time
  9. [2014-04-23] NEW task
    1. x] ADDed 'getDefaultTaskId'  method - to return task id of task named 'default-task', used on page add/task
  10. [2017-03-15] NEW task
    1. x] FIX-PRB-7140 - add explicit db connection close, db close statements
  11. [2017-04-11] NEW task
    1. x] FIX-PRB-7140 - add explicit db Dispose() statement

[currently]

[next]

  1. ] align/compare this doc with actual code
Details Photos Edit more

Details

ID: 1838

NAME: CLASS-Task

DESCRIPTION: CLASS - Task - documenting properties, constructors, methods and ... for this application component, based on Item,

START DATE TIME: 2013-06-10 11:00:00

EST DURATION: 03:00:00

END DATE TIME: 2013-06-10 14:00:00

STATUS: Completed

PRIORITY: -5

OWNER ID: 75

Content Photos Edit more

photos

photos for this task

actions

Agenda Email task SMS task Priorities