edit-task
Home
Up
Delete
Task Name:
Task Description:
CLASS Procedure, based on ItemCategory,
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/Procedure.cs ]</h1> <h2>[WHAT]</h2> <ol> <li>[ def ] class to work with Procedure objects</li> <li>[ args ] none </li> </ol> <h2>[WHY]</h2> <ol> <li><strong>[USING]</strong></li> <ol> <li>] System - console & ...</li> <li>] System.Collections - for ArrayList,</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>] id_procedure - </li> <li>] name_procedure - </li> <li>] description_procedure -</li> <li>] parent_id - </li> <li>] database - </li> <li>] qryGetProcedures - all procedures</li> <li>] qryGetProcedure - return single procedure</li> <li>] qryGetProceduresInApp - return all procedures in a given app</li> <li>] qryAddProcedure</li> <li>] qryDeleteProcedure </li> <li>] qryUpdateProcedure</li> <li>+</li> <li>] count - non-persistent -</li> <li>] lastIn - </li> <li>[objects]</li> <li>] app</li> </ol> <li><strong>[Constructors]</strong></li> <ol> <li>x] Procedure() - default, empty, creates a new EMPTY procedure instance with no values set</li> <li>x] Procedure(int id) - takes id of existing procedure, instantiates this.procedure with properties of existing procedure // creates a new procedure instance by retrieving values-of a procedure persisted in a db</li> <li>] Procedure(name, description, parent) - creates a new procedure instance populated with the values of passed in args</li> <li>] Procedure(string name, string description)- takes name and description args of procedure to create a new server OR </li> <li>] Procedure(string name) - instantiates a new instance of procedure object - based on lookup of existing procedure </li> <li>+] Procedure(int id,string name, ...) - instantiates a new instance of Procedure object</li> </ol> <li><strong>[Methods]</strong></li> <ol> <li>] GetProcedures() </li> <li>] GetProceduresInApp()</li> <li>] add () - add using the currently instantiated instance </li> <li>] static add (name,description) - where=??</li> <li>] delete() - </li> <li>] static delete(id) - </li> <li>] edit()</li> <li>] static edit (name,description) args[]</li> <li>] ById() </li> <li>] ListAll() -</li> <li><strong>[OTHER]</strong></li> <li>] getMaxId()- returns the id of the last record inserted into the procedures table</li> <li>] import()</li> <li>] getDefaultProcedureId() - returns the id of the default || user specified 'default procedure'</li> <li> <div><strong>[STATIC] </strong></div> </li> <li> <div>] setItemsStatus(status, ids) - sets all items to the given status </div> </li> <li> <div>] setItemsName(name, ids) - sets all user selected items "names" to the given name </div> </li> <li> <div>] setItemsDescription(description, ids) - sets all user selected items "descriptions" to the given description </div> </li> <li> <div>] setItemsCOGS(cogs, ids) - sets all user selected items "cogs" to the given value </div> </li> <li> <div>] setItemsQuantity(quantity, ids) - sets all user selected items "quantity" to the given value </div> </li> <li> <div>] setItemsUnit(unit, ids) - sets all user selected items "unit" to the give value </div> </li> </ol></ol> <h2>[WHERE]</h2> <ol> <li>[ called from] </li> <ol> <li>] view - procedures in app for current app</li> <li>] view procedure -</li> <li>] edit procedure -</li> <li>] add procedure - </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>] FILE Procedure.cs </li> <li>] Procedure.cs -<a href="/view/task?id=5632" target="_blank">v-001</a> - 2012-06-17</li> <li>] Procedure.cs <a href="/view/task?id=5633" target="_blank">-v-002</a> - 2015-09-22</li> </ol><hr /> <h1 style="text-align: center;">developer implementation</h1> <h2>[.process]</h2> <ol> <li> </li> </ol> <h2>[.notes]</h2> <ol> <li> </li> <li>] </li> </ol><hr /> <h1 style="text-align: center;">status<span style="font-size: 10px;"> </span></h1> <h2>[previously]</h2> <div><ol> <li><strong>[2013-mm-dd][00:00] CREATE new class</strong>, </li> <ol> <li>]</li> </ol> <li><strong>[2015-mm-dd][00:00] Validation</strong></li> <ol> <li>x] PAGE view/procedures - generated by class</li> </ol> <li><strong>[2015-mm-dd][00:00] add import method</strong></li> <ol> <li>] </li> </ol> <li>[00:00] documentation notes</li> </ol></div> <h2>[currently]</h2> <ol> <li>] </li> </ol> <h2>[next]</h2> <ol> <li>] </li> </ol>