edit-task
Home
Up
Delete
Task Name:
Task Description:
CLASS User
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/User.cs ]</h1> <h2>[WHAT]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>] to work with User objects</li> <li>[ args ] none , id, </li> </ol> <h2>[WHY]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li style="font-size: 10px; font-weight: normal;"><strong>[using]</strong></li> <ol style="font-size: 10px; font-weight: normal;"> <li>] System </li> <li>] System Dynamic - for Dynamic type used by ..</li> <li>] System.Web - for httpContext ... used by .. to access Session var ( get current_db)</li> <li>] System.Collections - for ieNumerable ... used by ...</li> <li>] WebMatrix.Data - for Database ... used by ... ] all</li> <li>] WebMatrix.Data.StronglyTyped - data library</li> </ol> <li style="font-size: 10px; font-weight: normal;"><strong>[Properties]</strong></li> <ol style="font-size: 10px; font-weight: normal;"> <li>] id - record in UserProfile table autoGenerated, </li> <li>] name - username ( a valid email address )</li> <li>] description - </li> <li>] pw - password field ??</li> <li>] rememberMe - bool, write login cookie to local machine</li> <li>] users - db </li> <li>] role - pulled from "sospeps" table, </li> <li>] count - int the number of 'sospeps' the user has permissions on</li> <li>] default_db - the sospep that can be set to load by default vs user choosing from list of </li> </ol> <li style="font-size: 10px; font-weight: normal;"><strong>[Constructors]</strong></li> <ol style="font-size: 10px; font-weight: normal;"> <li style="font-size: 10px; font-weight: normal;">] User() - default, empty instance of user object</li> <li>] User(id) - instantiates a new instance of user object by db lookup of user based on passed in arg of user id value</li> <li>] User(email) - instantiates a new instance of user object by db lookup of user based on passed in arg of username(aka email)</li> <li>] User(id,name,description) - create a new user by passing in the args of ...</li> <li>] User(id,name,description,pw,rememberMe) - create a new user instance by passing in the args of ...</li> </ol> <li style="font-size: 10px; font-weight: normal;"><strong>[Methods]</strong></li> <ol> <li style="font-size: 10px; font-weight: normal;">add()</li> <li style="font-size: 10px; font-weight: normal;">edit() </li> <li style="font-size: 10px; font-weight: normal;">delete()</li> <li style="font-size: 10px; font-weight: normal;">static delete(id)</li> <li style="font-size: 10px; font-weight: normal;">****</li> <li>static add(args[])</li> <li>static edit(args[])</li> <li style="font-size: 10px; font-weight: normal;">getMax()</li> <li style="font-size: 10px; font-weight: normal;">import()</li> <li>add(name,description) - </li> <li> </li> <li> </li> <li> </li> </ol></ol> <h2>[WHERE]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>[ called from] </li> <ol> <li>] _PageStart - </li> <li>] view users - </li> <li>] view user -</li> <li>] add user -</li> <li>] edit user -</li> <li> </li> </ol></ol> <h2>[WHEN]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>]</li> </ol> <h2>[EXAMPLE]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>] </li> </ol> <h2>[HOW-TO]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>]</li> </ol> <h2>[REFERENCE]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>] CLASS User.cs</li> </ol><hr style="font-size: 10px; font-weight: normal; text-align: start;" /> <h1 style="text-align: center;">developer implementation</h1> <h2>[.process]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li> </li> </ol> <h2>[.notes]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li> </li> </ol> <h2>[.by_date]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>[YYYY-mm-DD]</li> </ol><hr style="font-size: 10px; font-weight: normal; text-align: start;" /> <h1 style="text-align: center;">status<span style="font-size: 10px;"> </span></h1> <h2>[previously]</h2> <div style="font-size: 10px; font-weight: normal; text-align: start;"><ol> <li style="font-weight: normal;"><strong>[20YY-MM-DD] NEW tasak</strong></li> <ol style="font-weight: normal;"> <li style="font-weight: normal;">] # # - CREATE new class, </li> <li>x] used Warehouse.cs as template </li> </ol> <li><strong>[2013-05-20] NEW task</strong></li> <ol> <li>] - NEW VERSION -v-002</li> </ol> <li><strong>[2013-05-20] NEW task</strong></li> <ol> <li>] CUT GREENSPACE - looks like original used wh class as model, removed 'a bunch' of wh code</li> </ol> <li><strong>[2013-06-21] NEW task</strong></li> <ol> <li>] - add count property (login page) </li> </ol> <li><strong>[2013-06-25] NEW task</strong></li> <ol> <li>] - add static method for returning 'all sospeps' for a user, used on PG open_sospep</li> </ol></ol></div> <h2>[currently]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li><strong>[2013-06-25] NEW task</strong></li> <ol> <li><span style="text-decoration: line-through;">x] add sospeps property ( string [] OR ) for all 'sospeps' for a user</span> </li> <li>i] added default_db property, get by qry 'db_owner' , ( CURRENLTY WORKS TO RETURN THE FIRST sospep that the USER has, <span style="background-color: #ffff99;">NOT a user specified default_db</span> , used for users who have not added had 'public' added to ... ) </li> </ol> <li><strong>[2013-07-12] NEW task</strong></li> <ol> <li>] changed 'GetSospeps()' method from a 'static' method to non static, now returns data to calling page BUT </li> </ol> <li><strong>[2013-07-dd NEW task</strong></li> <ol> <li>] PRB is data is not accessible because it is 'dynamic' vs <type sospep>, </li> <li>] could be some syntactic method to access row/col index OR </li> <li>] could create class to work with alterd sospep OR </li> <li>] could rename fields in qry to align with existing 'sospep' class </li> </ol> <li><strong>[2017-04-dd] NEW task</strong></li> <ol> <li>x] # # - ADD distinct db connection close, db close, db dispose statements to logVisit() method</li> </ol> <li><strong>[2017-04-14] NEW task</strong></li> <ol> <li>x] # # - REM ] tracking database property, ] REM method logVisit()</li> <li>x] open db, but it is never closed, because method with close call (logVisit() is never called)</li> </ol></ol> <h2>[next]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>] </li> </ol> <h1 style="text-align: center;"> </h1>