task

[ CLASS app_code/User.cs ]

[WHAT]

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

[WHY]

  1. [using]
    1. ] System 
    2. ] System Dynamic - for Dynamic type used by ..
    3. ] System.Web - for httpContext ... used by .. to access Session var ( get current_db)
    4. ] System.Collections - for ieNumerable ... used by ...
    5. ] WebMatrix.Data - for Database ... used by ... ] all
    6. ] WebMatrix.Data.StronglyTyped - data library
  2. [Properties]
    1. ] id - record in UserProfile table autoGenerated, 
    2. ] name - username ( a valid email address )
    3. ] description - 
    4. ] pw - password field ??
    5. ] rememberMe - bool, write login cookie to local machine
    6. ] users - db 
    7. ] role - pulled from "sospeps" table,  
    8. ] count - int the number of 'sospeps' the user has permissions on
    9. ] default_db - the sospep that can be set to load by default vs user choosing from list of 
  3. [Constructors]
    1. ] User() - default, empty instance of user object
    2. ] User(id) - instantiates a new instance of user object by db lookup of user based on passed in arg of user id value
    3. ] User(email) - instantiates a new instance of user object by db lookup of user based on passed in arg of username(aka email)
    4. ] User(id,name,description) - create a new user by passing in the args of ...
    5. ] User(id,name,description,pw,rememberMe) - create a new user instance by passing in the args of ...
  4. [Methods]
    1. add()
    2. edit() 
    3. delete()
    4. static delete(id)
    5. ****
    6. static add(args[])
    7. static edit(args[])
    8. getMax()
    9. import()
    10. add(name,description) - 
    11.     
    12.     
    13.     

[WHERE]

  1. [ called from] 
    1. ] _PageStart - 
    2. ] view users - 
    3. ] view user -
    4. ] add user -
    5. ] edit user -
    6.  

[WHEN]

  1. ]

[EXAMPLE]

[HOW-TO]

  1. ]

[REFERENCE]

  1. ] CLASS User.cs

developer implementation

[.process]

  1.  

[.notes]

  1.  

[.by_date]

  1. [YYYY-mm-DD]

status 

[previously]

  1. [20YY-MM-DD] NEW tasak
    1. ] # # - CREATE new class, 
    2. x] used Warehouse.cs as template 
  2. [2013-05-20] NEW task
    1. ] - NEW VERSION -v-002
  3. [2013-05-20] NEW task
    1. ] CUT GREENSPACE - looks like original used wh class as model, removed 'a bunch' of wh code
  4. [2013-06-21] NEW task
    1. ] - add count property (login page)  
  5. [2013-06-25] NEW task
    1. ] - add static method for returning 'all sospeps' for a user, used on PG open_sospep

[currently]

  1. [2013-06-25] NEW task
    1. x] add sospeps property ( string [] OR ) for all 'sospeps' for a user  
    2. i] added default_db property, get by qry 'db_owner' , ( CURRENLTY WORKS TO RETURN THE FIRST sospep that the USER has, NOT a user specified default_db , used for users who have not added had 'public' added to ... ) 
  2. [2013-07-12] NEW task
    1. ] changed 'GetSospeps()' method from a 'static' method to non static, now returns data to calling page BUT 
  3. [2013-07-dd NEW task
    1. ] PRB is data is not accessible because it is 'dynamic' vs <type sospep>, 
    2. ] could be some syntactic method to access row/col index OR 
    3. ] could create class to work with alterd sospep OR 
    4. ] could rename fields in qry to align with existing 'sospep' class  
  4. [2017-04-dd] NEW task
    1. x] # # - ADD distinct db connection close, db close, db dispose statements to logVisit() method
  5. [2017-04-14] NEW task
    1. x] # # - REM ] tracking database property, ] REM method logVisit()
    2. x] open db, but it is never closed, because method with close call (logVisit() is never called)

[next]

 

Details Photos Edit more

Details

ID: 1972

NAME: CLASS-User

DESCRIPTION: CLASS User

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

EST DURATION: 03:00:00

END DATE TIME: 2013-06-24 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