C# 클래스 SANTA.IO.MSAccess

A class that performs IO operations on a Microsoft Access database.
파일 보기 프로젝트 열기: siegleal/iSanta

공개 메소드들

메소드 설명
AddCaliberUnit ( Datatype caliberUnit, ConfigReader configReader ) : void

Adds a caliber unit to the database.

AddWeaponName ( String weaponName, ConfigReader configReader ) : void

Adds a weapon name to the database.

GetCaliberUnits ( ConfigReader configReader ) : List

Returns all of the caliber options already in the database with their IDs.

GetWeaponNames ( ConfigReader configReader ) : List

Loads a list of weapon names from the database.

LoadData ( int targetID, ConfigReader configReader ) : Datatype.ImageData

Loads an ImageData from the database.

SaveData ( Datatype imageData, ConfigReader configReader ) : int

Saves an ImageData object to the Target table.

비공개 메소드들

메소드 설명
CaliberIDExists ( int caliberID, ConfigReader configReader ) : System.Boolean

Returns true if the given caliberID is in the database.

GetCaliberUnit ( int caliberID, ConfigReader configReader ) : Datatype.CaliberUnit

Loads a CaliberUnit from the database.

InsertData ( Datatype imageData, ConfigReader configReader ) : int

Inserts an ImageData object into the Target table.

UpdateData ( Datatype imageData, ConfigReader configReader ) : int

Updates an existing ImageData object in the Target table.

WeaponExists ( String weaponName, ConfigReader configReader ) : System.Boolean

Returns true if the given weaponName is in the database.

openConnection ( System.Data.OleDb.OleDbConnection conn ) : void

Opens a connection to the database specified in the OleDbConnection conn.

setStringParameter ( OleDbCommand command, String parameterName, String parameterValue ) : void

Sets a string parameter to an OleDbCommand. If the parameter value is null, it is replaced with the empty string.

메소드 상세

AddCaliberUnit() 공개 정적인 메소드

Adds a caliber unit to the database.
A connection-level error occurred while opening the connection. The INSERT INTO Caliber command failed.
public static AddCaliberUnit ( Datatype caliberUnit, ConfigReader configReader ) : void
caliberUnit Datatype The CaliberUnit to add to the database.
configReader ConfigReader The ConfigReader with the path to the database.
리턴 void

AddWeaponName() 공개 정적인 메소드

Adds a weapon name to the database.
A connection-level error occurred while opening the connection. The INSERT INTO Weapon command failed.
public static AddWeaponName ( String weaponName, ConfigReader configReader ) : void
weaponName String The weapon name to add to the database.
configReader ConfigReader The ConfigReader with the path to the database.
리턴 void

GetCaliberUnits() 공개 정적인 메소드

Returns all of the caliber options already in the database with their IDs.
A connection-level error occurred while opening the connection.
public static GetCaliberUnits ( ConfigReader configReader ) : List
configReader ConfigReader The ConfigReader with the path to the database.
리턴 List

GetWeaponNames() 공개 정적인 메소드

Loads a list of weapon names from the database.
A connection-level error occurred while opening the connection.
public static GetWeaponNames ( ConfigReader configReader ) : List
configReader ConfigReader The ConfigReader with the path to the database.
리턴 List

LoadData() 공개 정적인 메소드

Loads an ImageData from the database.
A connection-level error occurred while opening the connection.
public static LoadData ( int targetID, ConfigReader configReader ) : Datatype.ImageData
targetID int The of the target to load.
configReader ConfigReader The ConfigReader with the path to the database.
리턴 Datatype.ImageData

SaveData() 공개 정적인 메소드

Saves an ImageData object to the Target table.
A connection-level error occurred while opening the connection. The SQL command failed. The caliber or weapon name was not found in the database.
public static SaveData ( Datatype imageData, ConfigReader configReader ) : int
imageData Datatype The ImageData to save.
configReader ConfigReader The ConfigReader with the path to the database.
리턴 int