edit-task
Home
Up
Delete
Task Name:
Task Description:
CLASS - Person - documenting properties, constructors, methods and ... for this application component, (doc based on Task),
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/Person.cs ]</h1> <h2>[WHAT]</h2> <ol> <li>] Person.cs - documenting properties, constructors, methods and ... for this application component </li> </ol> <h2>[WHY]</h2> <ol> <li>] class to work with Person objects,</li> <li>[ args ] none[, id, ...] </li> </ol> <h2>[WHERE]</h2> <ol> <li><strong>[USING]</strong></li> <ol> <li>x] System</li> <li>x] System.Collections.Generic // for ieNumerable, used by ...</li> <li>x] System Dynamic // for Dynamic types, used by ..</li> <li>*x] System.Linq </li> <li>*x] System.Data.Linq </li> <li>x] System.Web // for httpContext, used by ... to access Session var ( get current_db)</li> <li>x] WebMatrix.Data // for Database methods, used by ... ] all</li> <li>x] WebMatrix.Data.StronglyTyped // for data library ST that converts dynamics to ST objects</li> </ol> <li><strong>[PROPERTIES]</strong></li> <ol> <li>x] public int id_person = value autogenerated by db table</li> <li>x] public string name_first =</li> <li>x] public string name_last =</li> <li>x] public string name_middle =</li> <li>x] public string description_person =</li> <li>x] public int parent_id =</li> <li>x] public string content_person</li> <li>x] public bool content_format</li> <li>x] public sbyte priority</li> <li>x] public string photo</li> <li>x] public string status</li> <li>x] public int owner </li> <li>x] public DateTime created</li> <li>] O MemberGroup</li> <li>] O Member</li> <li>] O Community</li> <li>] database</li> <li>*] count</li> <li>] [qryGet]</li> <li>] [qryFind]</li> <li>] [qryAdd]</li> <li>] [qryDelete]</li> <li>] [qryEdit]</li> </ol> <li><strong>[CONSTRUCTORS]</strong></li> <ol> <li>] Person() - default empty Person</li> <li>] Person(id) - by id - generate and instantiate an instance of a Person object using the id of the existing desired Person</li> <li>] Person(name) - by name - instantiate an instance of a Person object using the name of the existing desired Person</li> <li>OR 3] Person(string name) - instantiates a new instance of Person object with the provided name</li> <li>] Person (int id,string name, ...) - instantiates a new instance of a Person object with the provided properties for id, name</li> </ol> <li><strong>[METHODS]</strong></li> <ol> <li>] public static IEnumerable<Person>GetAllPersons() </li> <li>] public static IEnumerable<Person>GetPersonById(int PersonId)</li> <li>] public static IEnumerable<Person>GetPersonsInMemberGroup(int memberGroupId)</li> <li>] public static IEnumerable<Person>GetPersonsInMemberGroup(int memberGroupId, int start, int qty)</li> <li><strong>] public static IEnumerable<Person>GetPeopleInMemberGroup(string src_db, int memberGroupId) // MODIFY src to using </strong> </li> <li>] public static IEnumerable<Person>GetPersonsByNameLast(string param1) </li> <li>] public static IEnumerable<Person>GetPersonsByNameMiddle(string param1) </li> <li>] public static IEnumerable<Person>GetPersonsByNameFirst(string param1)</li> <li>] public static IEnumerable<Person>GetPersonsByNameFull(string nameLast, string nameFirst) </li> <li>] public static IEnumerable<Person>GetPersonsByDescription(string description) </li> <li>] public static IEnumerable<Person>GetPersonsInCommunity(int communityId)</li> <li>] public static IEnumerable<Person>GetPersonsInMember(int memberId) </li> <li>* * * </li> <li>] public static IEnumerable<Person>GetPersonsByPriority(sbyte priority) </li> <li>] public static IEnumerable<Person>GetPersonsByStatus(string status)</li> <li>] public static IEnumerable<Person>GetPersonsByContent(string content) </li> <li>] public static IEnumerable<Person>GetPersonsByOwner(int OwnerId) </li> <li>] public static IEnumerable<Person>GetPersonsByDOB(DateTime dob)</li> <li>] public static IEnumerable<Person>GetPersonByEmail(string email) </li> <li>> BM l# 500/800 </li> <li><span style="background-color: #c0c0c0;"><strong>[ADD]</strong></span></li> <li><span style="background-color: #c0c0c0;">] add(name, description) -</span></li> <li><span style="background-color: #c0c0c0;">x] delete() to delete a task object that has already been instantiated</span></li> <li><span style="background-color: #c0c0c0;">x] delete(id) STATIC method to delete an existing task object given its id value</span></li> <li><span style="background-color: #c0c0c0;">x] edit() - updates the values of the user record based on the values in the current instance,</span></li> <li><span style="background-color: #c0c0c0;">x] edit(id) - STATIC - method to update an existing task given its id value</span></li> <li><span style="background-color: #c0c0c0;">] edit(name,description)</span></li> <li><span style="background-color: #c0c0c0;"><strong>[EDITS]</strong></span></li> <li><span style="background-color: #c0c0c0;">x] setTasksName(name, ids) - sets all user selected tasks "names" to the given name</span></li> <li><span style="background-color: #c0c0c0;">x] setTasksDescription(description, ids) - sets all user selected tasks "descriptions" to the given description</span></li> <li><span style="background-color: #c0c0c0;">x] setTasksStartTime(cogs, ids) - sets all user selected tasks "cogs" to the given value</span></li> <li><span style="background-color: #c0c0c0;">x] setTasksDuration(quantity, ids) - sets all user selected tasks "quantity" to the given value</span></li> <li><span style="background-color: #c0c0c0;">x] setTasksStatus(status, ids) - sets all tasks to the given status</span></li> <li><span style="background-color: #c0c0c0;">] setTasksPriority()</span></li> <li><span style="background-color: #c0c0c0;">] Photo</span></li> <li><span style="background-color: #c0c0c0;">] Content</span></li> <li><span style="background-color: #c0c0c0;">] ContentFormat</span></li> <li><span style="background-color: #c0c0c0;">] owner</span></li> <li><span style="background-color: #c0c0c0;"><strong>[OTHER]</strong></span></li> <li><span style="background-color: #c0c0c0;">] getUser(id) -</span></li> <li><span style="background-color: #c0c0c0;">x] getMaxId() -</span></li> <li><span style="background-color: #c0c0c0;">] getDefaultTaskId()</span></li> </ol></ol> <h2>[WHERE]</h2> <ol> <li>[ called from] </li> <ol> <li>] </li> </ol></ol> <h2>[WHEN]</h2> <ol> <li>] 2017-07-06 - class </li> <li>] 2017-05-04 - published documentation</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li>] </li> </ol> <h2>[HOW-TO]</h2> <ol> <li>]</li> </ol> <h2>[REFERENCE]</h2> <ol> <li>] CLASS Task.cs</li> </ol> <h2>[RELATED]</h2> <div><ol> <li>] </li> </ol></div> <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>] </li> </ol> <li><strong>[2017-05-04] NEW task</strong></li> <ol> <li>x] # 7298 - CREATE-doc (this) - Person.cs - documentation file</li> </ol> <li><strong>[2017-05-04] NEW task</strong></li> <ol> <li>x] # # - FIX-PRB-7140 - add explicit db connection close, db close statements to methods ...</li> <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>