edit-task
Home
Up
Delete
Task Name:
Task Description:
CLASS - Task - documenting properties, constructors, methods and ... for this application component, based on Item,
TaskGroup ID:
Start Date:
Start Time:
Duration:
Priority:
Status:
To Do
Completed
In Process
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">[ CLASS - /App_Code/Task.cs ]</h1> <h2>[WHAT]</h2> <ol> <li>] Task.cs - documenting properties, constructors, methods and ... for this application component </li> </ol> <h2>[WHY]</h2> <ol> <li>] class to work with Task objects,</li> <li>[ args ] none[, id, ...] </li> </ol> <h2>[WHERE]</h2> <ol> <li><strong>[USING]</strong></li> <ol> <li>] System</li> <li>] System.Collections.Generic // for ieNumerable, used by ...</li> <li>] System Dynamic // for Dynamic types, used by ..</li> <li>] System.Web // for httpContext, used by ... to access Session var ( get current_db)</li> <li>] WebMatrix.Data // for Database methods, used by ... ] all</li> <li>] WebMatrix.Data.StronglyTyped // for data library ST that converts dynamics to ST objects</li> </ol> <li><strong>[PROPERTIES]</strong></li> <ol> <li>x] id_task = value autogenerated by db table</li> <li>x] name_task =</li> <li>x] description_task =</li> <li>x] parent_id =</li> <li>x]] start_time =</li> <li>x]] duration =</li> <li>] est completion time = </li> <li>x]] priority</li> <li>x] photo</li> <li>x] status</li> <li>x] content_task</li> <li>x] content_format</li> <li>*] count</li> <li>] O Taskgroup</li> <li>] O Plan</li> <li>] O Calendar</li> <li>] database</li> <li>] [qryGet]</li> <li>] [qryFind]</li> <li>] [qryAdd]</li> <li>] [qryDelete]</li> <li>] [qryEdit]</li> </ol> <li><strong>[CONSTRUCTORS]</strong></li> <ol> <li>x] Task() - default empty Task</li> <li>x] Task(id) - by id - generate and instantiate an instance of a Task object using the id of the existing desired task</li> <li>] Task(name) - by name - instantiate an instance of a Task object using the name of the existing desired task</li> <li>OR 3] Task(string name) - instantiates a new instance of Task object with the provided nam</li> <li>] Task (int id,string name, ...) - instantiates a new instance of a Task object with the provided properties</li> </ol> <li><strong>[METHODS]</strong></li> <ol> <li>static add(args[])</li> <li>static edit(args[])</li> <li>import()</li> <li>***</li> <li>x] GetAllTasks() - STATIC - USED on PG view/index, item = view-All-tasks</li> <li>x] GetTasksInTaskGroup() STATIC - USED on PG view/tasks, - default</li> <li>x] GetTaskById()</li> <li>x] getTasksByName - </li> <li>x] getTasksByDescription -</li> <li>x] getTasksInCalendar -</li> <li>x] getTasksInPlan -</li> <li>] getTasksByStartDate -</li> <li>] getTasksByDuration -</li> <li>] getTasksByPriority - </li> <li>] getTasksByStatus - </li> <li>] getTasksByContent - </li> <li><strong>[ADD]</strong></li> <li>] add(name, description) -</li> <li>x] delete() to delete a task object that has already been instantiated</li> <li>x] delete(id) STATIC method to delete an existing task object given its id value</li> <li>x] edit() - updates the values of the user record based on the values in the current instance,</li> <li>x] edit(id) - STATIC - method to update an existing task given its id value</li> <li>] edit(name,description)</li> <li><strong>[EDITS]</strong></li> <li>x] setTasksName(name, ids) - sets all user selected tasks "names" to the given name</li> <li>x] setTasksDescription(description, ids) - sets all user selected tasks "descriptions" to the given description</li> <li>x] setTasksStartTime(cogs, ids) - sets all user selected tasks "cogs" to the given value</li> <li>x] setTasksDuration(quantity, ids) - sets all user selected tasks "quantity" to the given value</li> <li>x] setTasksStatus(status, ids) - sets all tasks to the given status</li> <li>] setTasksPriority()</li> <li>] Photo</li> <li>] Content</li> <li>] ContentFormat</li> <li>] owner</li> <li><strong>[OTHER]</strong></li> <li>] getUser(id) -</li> <li>x] getMaxId() -</li> <li>] getDefaultTaskId()</li> </ol></ol> <h2>[WHERE]</h2> <ol> <li>[ called from] </li> <ol> <li>] </li> </ol></ol> <h2>[WHEN]</h2> <ol> <li>]</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li>] </li> </ol> <h2>[HOW-TO]</h2> <ol> <li>]</li> </ol> <h2>[REFERENCE]</h2> <ol> <li>] CLASS Article.cs</li> </ol><hr /> <h1 style="text-align: center;">developer implementation</h1> <h2>[.process]</h2> <ol> <li> </li> </ol> <h2>[.notes]</h2> <ol> <li> 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</li> <li>OR ] use a tool like visual studio to produce the api documentation,</li> <li>PROPERTIES LIST - LEGEND</li> <ol> <li>]] = unique to this</li> <li>* = property not persisted</li> <li>O preface = property is an object</li> </ol> <li> ] REF # 2394 for details on 1] USING statements, 2] PROPERTIES - CLASS, 3] CONSTRUCTORS - 4] METHODS - CRUD 5] METHODS - OTHER</li> </ol><hr /> <h1 style="text-align: center;">status<span style="font-size: 10px;"> </span></h1> <h2>[previously]</h2> <ol> <li><strong>[2012-06-10] NEW task</strong></li> <ol> <li>] FILE - Task.cs - added, based on Item.cs</li> <li>] PG Record - Task.cs - added,(this)</li> </ol> <li><strong>[2012-06-29] </strong></li> <ol> <li>x] build Task class using Item.cs as a template, x] removed Positions class</li> </ol> <li><strong>[2012-07-09]</strong></li> <ol> <li>X] (id=2394) Task.cs</li> <li>x] updated to priority and owner fields IF null THEN set value OR else get ERROR </li> </ol> <li><strong>[2012-09-23] NEW task IN</strong></li> <ol> <li>] ADDED</li> </ol> <li><strong>[2013-05-13] NEW task </strong></li> <ol> <li>x] ADDED created field</li> </ol> <li><strong>[2013-08-22] NEW task</strong></li> <ol> <li>x] ADD method copy</li> </ol> <li><strong>[2013-06-10]</strong></li> <ol> <li>*] TASK is start_time(DT) NOT start_date(DT) like others</li> <li>x] CHECK - SET Datetime.now IF default-dateTime = '2012-10-31 21:19:02'</li> <li>*] default date is SET where = ???</li> <li>x] CHECK - TASK owner if 0 then 1, if => 1 then value </li> </ol> <li><strong>[2013-mm-dd]</strong></li> <ol> <li>] + derived property = end time</li> </ol> <li><strong>[2014-04-23] NEW task</strong></li> <ol> <li>x] ADDed 'getDefaultTaskId' method - to return task id of task named 'default-task', used on page add/task</li> </ol> <li><strong>[2017-03-15] NEW task</strong></li> <ol> <li>x] FIX-PRB-7140 - add explicit db connection close, db close statements</li> </ol> <li><strong>[2017-04-11] NEW task</strong></li> <ol> <li>x] FIX-PRB-7140 - add explicit db Dispose() statement</li> </ol></ol> <h2>[currently]</h2> <ol> <li>] </li> </ol> <h2>[next]</h2> <ol> <li>] align/compare this doc with actual code</li> </ol>