/// <summary> /// This method finds a 'State' object. /// This method uses the 'State_Find' procedure. /// </summary> /// <returns>A 'State' object.</returns> /// </summary> public State FindState(FindStateStoredProcedure findStateProc, DataConnector databaseConnector) { // Initial Value State state = null; // Verify database connection is connected if ((databaseConnector != null) && (databaseConnector.Connected)) { // First Get Dataset DataSet stateDataSet = this.DataHelper.LoadDataSet(findStateProc, databaseConnector); // Verify DataSet Exists if (stateDataSet != null) { // Get DataTable From DataSet DataRow row = this.DataHelper.ReturnFirstRow(stateDataSet); // if row exists if (row != null) { // Load State state = StateReader.Load(row); } } } // return value return(state); }