BmfoOperationsRecord Class Reference

List of all members.

Public Member Functions

 BmfoOperationsRecord ($dbxconnection)
 printHtmlDatePicker ($strName, $strLabel, $strFacilityID, $intSelectedValue, $strHelp="")
 printHtmlForm ($strPrefix="", $boolDate=TRUE, $arrValues=array())
 insertFromSession ($strPrefix="", $boolQuiet=FALSE, $boolInstallation=FALSE)
 insert ($boolQuiet=FALSE, $boolInstallation=FALSE, $strValue, $strRecordDate, $strStatus)
 isClockoverEvent ($strPrefix="", $boolQuiet=FALSE, $strRecordDate="")
 getDependentEstimationsArray ($recorddate)
 delete ($intOperationsRecordID, $Mail=NULL)

Public Attributes

 $rdbms

Detailed Description

Functionality related to OperationsRecords


Constructor & Destructor Documentation

BmfoOperationsRecord::BmfoOperationsRecord dbxconnection  ) 
 


Member Function Documentation

BmfoOperationsRecord::delete intOperationsRecordID,
Mail = NULL
 

Delete an OperationsRecord. Also deletes InstallationRecords if necessary.

Parameters:
$intOperationsRecordID is the ID of the record.
$Mail is the optional Mail object when emails have to be send.
Returns:
TRUE if the deletion was successful and FALSE if it failed.
RecordDate is used to identify dependent EstimationRecords.

Delete the child records from the installationrecord.

Verify the deletion.

No constraint binds EstimationRecords to OperationRecords, so they can be deleted last.

BmfoOperationsRecord::getDependentEstimationsArray recorddate  ) 
 

BmfoOperationsRecord::insert boolQuiet = FALSE,
boolInstallation = FALSE,
strValue,
strRecordDate,
strStatus
 

Insert a new OperationsRecord to the database.

Parameters:
$boolQuiet is an optional parameter that decides whether success or failure is reported by echo()
$boolInstallation is an optional parameter that indicates whether the OperationsRecord is related to an InstallationRecord or not.
$strValue is the OperationsRecord value.
$strRecordDate is the date when the value was recorded.
$strStatus is the status of the measurement device.
Returns:
OperationsRecordID on success or NULL on failure.
Validate input.

Todo:
maybe remove query for performance purposes

Don't enter the same record twice

Todo:
Check for installation events

Check the RecordDate.

Insert unknown meter installation if necessary.

Insert meter removal event if necessary.

BmfoOperationsRecord::insertFromSession strPrefix = "",
boolQuiet = FALSE,
boolInstallation = FALSE
 

Insert a new OperationsRecord. Retrieve the values from $_SESSION.

Parameters:
$strPrefix is an optional parameter that will be prepended to form element names.
$boolQuiet is an optional parameter that decides whether success or failure is reported by echo()
$boolInstallation is an optional parameter that indicates whether the OperationsRecord is related to an InstallationRecord or not.
Returns:
OperationsRecordID on success or NULL on failure.
Check whether the installation form is filled correctly.

BmfoOperationsRecord::isClockoverEvent strPrefix = "",
boolQuiet = FALSE,
strRecordDate = ""
 

Check whether a meter reading from the $_POST array is a clockover even or not

Parameters:
$strPrefix is an optional parameter that will be prepended before "RecordDate" and "Value" when retrieving values from $_POST.
$boolQuiet is an optional parameter that allows to suppress echo output from the function. Default is FALSE.
$strRecordDate is the optional RecordDate that is used when $strPrefix."RecordDate" is not a key in $_POST
Returns:
TRUE if the meter reading from the POST array is a clockover event, otherwise FALSE; NULL is returned if the query fails.

BmfoOperationsRecord::printHtmlDatePicker strName,
strLabel,
strFacilityID,
intSelectedValue,
strHelp = ""
 

Print a HTML select statement with dates

Parameters:
$strName is the Name of the HTML element.
$strLabel is the text that is shown in the browser.
$strFacilityID is the NetworkOID of the meter
$intSelectedValue is the index of the selected list element
$strHelp is the context-sensitive help.
Returns:
Nothing is returned.
Todo:
Use the HTML title attribute instead.

BmfoOperationsRecord::printHtmlForm strPrefix = "",
boolDate = TRUE,
arrValues = array()
 

Print a part of the form for data entry

Parameters:
$strPrefix is an optional string that will be prepended to form element names
$boolDate is an optional parameter that decides whether the date field is offered for data entry or not
$arrValues is the optional array containing values to be displayed
Todo:
Implement "Select One".
Returns:
Nothing.


Member Data Documentation

BmfoOperationsRecord::$rdbms
 


The documentation for this class was generated from the following file:
Generated on Tue Sep 26 22:29:57 2006 for BMFO by  doxygen 1.4.6-NO