edit-task
Home
Up
Delete
Task Name:
Task Description:
CLASS sServer, object to
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/sServer.cs ]</h1> <h2>[WHAT]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>[ def ] class to work with system server 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 - 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 style="font-size: 10px; font-weight: normal;"><strong>[Properties]</strong></li> <ol style="font-size: 10px; font-weight: normal;"> <li>] id_server</li> <li>] name_server</li> <li>] description_server -</li> <li>] database</li> <li>] qryGetServers</li> <li>] qryAddServer</li> <li>] qryDeleteServer</li> <li>] qryUpdateServer</li> <li><strong>[+++] </strong></li> <li>] count - non-persistent -</li> <li>] lastIn -</li> <li><strong>[objects] </strong></li> <li>] none</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;">] Server()</li> <ol> <li style="font-size: 10px; font-weight: normal;">- default, empty</li> </ol> <li style="font-size: 10px; font-weight: normal;">] Server(int id)</li> <ol> <li style="font-size: 10px; font-weight: normal;">- takes id of existing server, instantiates this.server with properties of existing server</li> </ol> <li style="font-size: 10px; font-weight: normal;">] Server(string name, string description)</li> <ol> <li style="font-size: 10px; font-weight: normal;">- takes name and description args of server to create a new server OR</li> </ol> <li style="font-size: 10px; font-weight: normal;">] Server(string name)</li> <ol> <li style="font-size: 10px; font-weight: normal;">- instantiates a new instance of server object - based on lookup of existing server</li> </ol> <li style="font-size: 10px; font-weight: normal;"><strong>[+++ ]</strong></li> <li style="font-size: 10px; font-weight: normal;">Server(int id,string name, ...) - instantiates a new instance of Server object</li> </ol> <li style="font-size: 10px; font-weight: normal;"><strong>[Methods]</strong></li> <ol> <li style="font-size: 10px; font-weight: normal;"><strong>// CRUD</strong></li> <li style="font-size: 10px; font-weight: normal;">] GetServers()</li> <li style="font-size: 10px; font-weight: normal;">] ListAll()</li> <li style="font-size: 10px; font-weight: normal;">] ById</li> <li style="font-size: 10px; font-weight: normal;">] add ()</li> <li style="font-size: 10px; font-weight: normal;">] add (name,description) - where=?</li> <li style="font-size: 10px; font-weight: normal;">] delete() </li> <li style="font-size: 10px; font-weight: normal;">] delete(id) </li> <li style="font-size: 10px; font-weight: normal;">] edit() </li> <li style="font-size: 10px; font-weight: normal;">] edit(name,description)</li> <li style="font-size: 10px; font-weight: normal;">] edit ()</li> <li style="font-size: 10px; font-weight: normal;"><strong>// STATIC </strong></li> <li style="font-size: 10px; font-weight: normal;"><span style="text-decoration: line-through;">] setItemsStatus(status, ids) - sets all items to the given status</span></li> <li style="font-size: 10px; font-weight: normal;"><span style="text-decoration: line-through;">] setItemsName(name, ids) - sets all user selected items "names" to the given name</span></li> <li style="font-size: 10px; font-weight: normal;"><span style="text-decoration: line-through;">] setItemsDescription(description, ids) - sets all user selected items "descriptions" to the given description</span></li> <li style="font-size: 10px; font-weight: normal;"><span style="text-decoration: line-through;">] setItemsCOGS(cogs, ids) - sets all user selected items "cogs" to the given value</span></li> <li style="font-size: 10px; font-weight: normal;"><span style="text-decoration: line-through;">] setItemsQuantity(quantity, ids) - sets all user selected items "quantity" to the given value</span></li> <li style="font-size: 10px; font-weight: normal;"><span style="text-decoration: line-through;">] setItemsUnit(unit, ids) - sets all user selected items "unit" to the give value</span></li> <li style="font-size: 10px; font-weight: normal;"><strong>// OTHER </strong></li> <li style="font-size: 10px; font-weight: normal;">] getMaxId() - returns the id of the last record inserted into the</li> </ol></ol> <h2>[WHERE]</h2> <ol style="font-size: 10px; font-weight: normal; text-align: start;"> <li>[ called from] </li> <ol> <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>] FILE Server.cs</li> <li>] 2013-06-29 - ADD Constructor(by_name)</li> <li>] 2012-06-14 - sServer.cs -<a href="/view/task?id=5628" target="_blank">v-001</a> </li> <li>] 2015-09-21 - sServer.cs -<a href="/view/task?id=5629" target="_blank">v-002</a> </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> <ol> <li>[2015-08-13]</li> <ol> <li>] move CLASS documentation from src code file</li> </ol></ol> <h2>[currently]</h2> <ol> <li>] </li> </ol> <h2>[next]</h2> <ol> <li>]</li> </ol> <p> </p>