C# Class NanoTimeTracker.DatabaseManager

Show file Open project: TaoK/NanoTimeTracker Class Usage Examples

Private Properties

Property Type Description
DeriveLogFileName string
Export void
FindExistingInProgressTask System.Data.DataRow
GetComputedDouble double
GetTaskRow System.Data.DataRow
Import void
UpdateTask System.DateTime

Public Methods

Method Description
DatabaseManager ( ) : System
DeleteLogs ( ) : void
GetBindingSource ( ) : System.Windows.Forms.BindingSource
GetHoursTotals ( System.DateTime fromDate, System.DateTime toDate, bool billableOnly ) : double
GetInProgressTaskDetails ( System.DateTime &taskStartTime, string &taskDescription, string &taskCategory, bool &taskBillable ) : bool
GetTaskDetailsByTask ( System.DateTime existingTaskTime, System.DateTime &taskEndDate, string &taskDescription, string &taskCategory, bool &taskTimeBillable ) : bool
LoadDatabase ( ) : void
ReadAutoCompletionDataFromDB ( ) : void
SaveTimeTrackingDB ( ) : void
SaveTimeTrackingDB ( bool AllowDateSwitch ) : void
StartLoggingTask ( System.DateTime taskStartTime, string taskDescription, string taskCategory, bool taskTimeBillable ) : void
UpdateLogOpenTask ( System.DateTime taskStartTime, System.DateTime taskEndDate, string taskDescription, string taskCategory, bool taskTimeBillable ) : void
UpdateLogTask ( System.DateTime taskStartTime, System.DateTime taskNewStartTime, System.DateTime taskNewEndDate, string taskNewDescription, string taskNewCategory, bool taskNewTimeBillable ) : void

Private Methods

Method Description
DeriveLogFileName ( ) : string
Export ( string destinationFileName, System.DateTime fromDate, System.DateTime toDate, bool billableEntriesOnly ) : void
FindExistingInProgressTask ( System.DateTime taskStartTime ) : DataRow
GetComputedDouble ( string expression, string filter ) : double
GetTaskRow ( System.DateTime existingTaskTime ) : DataRow
Import ( string sourceFileName ) : void
UpdateTask ( DataRow rowToUpdate, System.DateTime taskStartTime, System.DateTime taskEndDate, string taskDescription, string taskCategory, bool taskTimeBillable ) : System.DateTime

Method Details

DatabaseManager() public method

public DatabaseManager ( ) : System
return System

DeleteLogs() public method

public DeleteLogs ( ) : void
return void

GetBindingSource() public method

public GetBindingSource ( ) : System.Windows.Forms.BindingSource
return System.Windows.Forms.BindingSource

GetHoursTotals() public method

public GetHoursTotals ( System.DateTime fromDate, System.DateTime toDate, bool billableOnly ) : double
fromDate System.DateTime
toDate System.DateTime
billableOnly bool
return double

GetInProgressTaskDetails() public method

public GetInProgressTaskDetails ( System.DateTime &taskStartTime, string &taskDescription, string &taskCategory, bool &taskBillable ) : bool
taskStartTime System.DateTime
taskDescription string
taskCategory string
taskBillable bool
return bool

GetTaskDetailsByTask() public method

public GetTaskDetailsByTask ( System.DateTime existingTaskTime, System.DateTime &taskEndDate, string &taskDescription, string &taskCategory, bool &taskTimeBillable ) : bool
existingTaskTime System.DateTime
taskEndDate System.DateTime
taskDescription string
taskCategory string
taskTimeBillable bool
return bool

LoadDatabase() public method

public LoadDatabase ( ) : void
return void

ReadAutoCompletionDataFromDB() public method

public ReadAutoCompletionDataFromDB ( ) : void
return void

SaveTimeTrackingDB() public method

public SaveTimeTrackingDB ( ) : void
return void

SaveTimeTrackingDB() public method

public SaveTimeTrackingDB ( bool AllowDateSwitch ) : void
AllowDateSwitch bool
return void

StartLoggingTask() public method

public StartLoggingTask ( System.DateTime taskStartTime, string taskDescription, string taskCategory, bool taskTimeBillable ) : void
taskStartTime System.DateTime
taskDescription string
taskCategory string
taskTimeBillable bool
return void

UpdateLogOpenTask() public method

public UpdateLogOpenTask ( System.DateTime taskStartTime, System.DateTime taskEndDate, string taskDescription, string taskCategory, bool taskTimeBillable ) : void
taskStartTime System.DateTime
taskEndDate System.DateTime
taskDescription string
taskCategory string
taskTimeBillable bool
return void

UpdateLogTask() public method

public UpdateLogTask ( System.DateTime taskStartTime, System.DateTime taskNewStartTime, System.DateTime taskNewEndDate, string taskNewDescription, string taskNewCategory, bool taskNewTimeBillable ) : void
taskStartTime System.DateTime
taskNewStartTime System.DateTime
taskNewEndDate System.DateTime
taskNewDescription string
taskNewCategory string
taskNewTimeBillable bool
return void