task

[ CLASS -  /App_Code/Person.cs ]

[WHAT]

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

[WHY]

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

[WHERE]

  1. [USING]
    1. x] System
    2. x] System.Collections.Generic // for ieNumerable, used by ...
    3. x] System Dynamic // for Dynamic types, used by ..
    4. *x] System.Linq 
    5. *x] System.Data.Linq 
    6. x] System.Web // for httpContext, used by ... to access Session var ( get current_db)
    7. x] WebMatrix.Data // for Database methods, used by ... ] all
    8. x] WebMatrix.Data.StronglyTyped // for data library ST that converts dynamics to ST objects
  2. [PROPERTIES]
    1. x] public int id_person = value autogenerated by db table
    2. x] public string name_first =
    3. x] public string name_last =
    4. x] public string name_middle =
    5. x] public string description_person =
    6. x] public int parent_id =
    7. x] public string content_person
    8. x] public bool content_format
    9. x] public sbyte priority
    10. x] public string photo
    11. x] public string status
    12. x] public int owner 
    13. x] public DateTime created
    14. ] O MemberGroup
    15. ] O Member
    16. ] O Community
    17. ] database
    18. *] count
    19. ] [qryGet]
    20. ] [qryFind]
    21. ] [qryAdd]
    22. ] [qryDelete]
    23. ] [qryEdit]
  3. [CONSTRUCTORS]
    1. ] Person() - default empty Person
    2. ] Person(id) - by id - generate and instantiate an instance of a Person object using the id of the existing desired Person
    3. ] Person(name) - by name - instantiate an instance of a Person object using the name of the existing desired Person
    4. OR 3] Person(string name) - instantiates a new instance of Person object with the provided name
    5. ] Person (int id,string name, ...) - instantiates a new instance of a Person object with the provided properties for id, name
  4. [METHODS]
    1. ] public static IEnumerable<Person>GetAllPersons() 
    2. ] public static IEnumerable<Person>GetPersonById(int PersonId)
    3. ] public static IEnumerable<Person>GetPersonsInMemberGroup(int memberGroupId)
    4. ] public static IEnumerable<Person>GetPersonsInMemberGroup(int memberGroupId, int start, int qty)
    5. ] public static IEnumerable<Person>GetPeopleInMemberGroup(string src_db, int memberGroupId) // MODIFY src to using  
    6. ] public static IEnumerable<Person>GetPersonsByNameLast(string param1) 
    7. ] public static IEnumerable<Person>GetPersonsByNameMiddle(string param1) 
    8. ] public static IEnumerable<Person>GetPersonsByNameFirst(string param1)
    9. ] public static IEnumerable<Person>GetPersonsByNameFull(string nameLast, string nameFirst) 
    10. ] public static IEnumerable<Person>GetPersonsByDescription(string description) 
    11. ] public static IEnumerable<Person>GetPersonsInCommunity(int communityId)
    12. ] public static IEnumerable<Person>GetPersonsInMember(int memberId) 
    13. * * * 
    14. ] public static IEnumerable<Person>GetPersonsByPriority(sbyte priority) 
    15. ] public static IEnumerable<Person>GetPersonsByStatus(string status)
    16. ] public static IEnumerable<Person>GetPersonsByContent(string content) 
    17. ] public static IEnumerable<Person>GetPersonsByOwner(int OwnerId) 
    18. ] public static IEnumerable<Person>GetPersonsByDOB(DateTime dob)
    19. ] public static IEnumerable<Person>GetPersonByEmail(string email)  
    20. > BM l# 500/800 
    21. [ADD]
    22. ] add(name, description) -
    23. x] delete() to delete a task object that has already been instantiated
    24. x] delete(id) STATIC method to delete an existing task object given its id value
    25. x] edit() - updates the values of the user record based on the values in the current instance,
    26. x] edit(id) - STATIC - method to update an existing task given its id value
    27. ] edit(name,description)
    28. [EDITS]
    29. x] setTasksName(name, ids) - sets all user selected tasks "names" to the given name
    30. x] setTasksDescription(description, ids) - sets all user selected tasks "descriptions" to the given description
    31. x] setTasksStartTime(cogs, ids) - sets all user selected tasks "cogs" to the given value
    32. x] setTasksDuration(quantity, ids) - sets all user selected tasks "quantity" to the given value
    33. x] setTasksStatus(status, ids) - sets all tasks to the given status
    34. ] setTasksPriority()
    35. ] Photo
    36. ] Content
    37. ] ContentFormat
    38. ] owner
    39. [OTHER]
    40. ] getUser(id) -
    41. x] getMaxId() -
    42. ] getDefaultTaskId()

[WHERE]

  1. [ called from] 
    1. ]   

[WHEN]

  1. ] 2017-07-06 - class 
  2. ] 2017-05-04 - published documentation

[EXAMPLE]

[HOW-TO]

  1. ]

[REFERENCE]

  1. ] CLASS Task.cs

[RELATED]


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
  11. [2017-05-04] NEW task
    1. x] # 7298 - CREATE-doc (this) - Person.cs - documentation file
  12. [2017-05-04] NEW task
    1. x] # # - FIX-PRB-7140 - add explicit db connection close, db close statements to methods ...
    2. 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: 7298

NAME: CLASS-Person

DESCRIPTION: CLASS - Person - documenting properties, constructors, methods and ... for this application component, (doc based on Task),

START DATE TIME: 2017-05-04 11:00:00

EST DURATION: 03:00:00

END DATE TIME: 2017-05-04 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