/// <summary> /// This method creates the sql Parameters[] needed for /// update an existing referencesSet. /// </summary> /// <param name="referencesSet">The 'ReferencesSet' to update.</param> /// <returns></returns> internal static SqlParameter[] CreateUpdateParameters(ReferencesSet referencesSet) { // Initial Values SqlParameter[] parameters = new SqlParameter[3]; SqlParameter param = null; // verify referencesSetexists if (referencesSet != null) { // Create parameter for [ProjectId] param = new SqlParameter("@ProjectId", referencesSet.ProjectId); // set parameters[0] parameters[0] = param; // Create parameter for [ReferencesSetName] param = new SqlParameter("@ReferencesSetName", referencesSet.ReferencesSetName); // set parameters[1] parameters[1] = param; // Create parameter for [ReferencesSetId] param = new SqlParameter("@ReferencesSetId", referencesSet.ReferencesSetId); parameters[2] = param; } // return value return(parameters); }
/// <summary> /// Edit an existing ReferencesSet. /// </summary> /// <returns></returns> public static ReferencesSet EditReferencesSet(ReferencesSet selectedReferencesSet, Project selectedProject) { // initial value ReferencesSet refSet = null; // Create references Set form ReferencesSetEditorForm referencesForm = new ReferencesSetEditorForm(); // Set the selected project referencesForm.ReferencesSetEditor.SelectedProject = selectedProject; // prepare control referencesForm.ReferencesSetEditor.Setup(selectedReferencesSet); // references set editor referencesForm.ShowDialog(); // if the user did not cancel if (!referencesForm.UserCancelled) { // set refSet refSet = referencesForm.ReferencesSetEditor.SelectedReferencesSet; } else { // set to null refSet = null; } // return value return(refSet); }
/// <summary> /// This method finds a 'ReferencesSet' object. /// This method uses the 'ReferencesSet_Find' procedure. /// </summary> /// <returns>A 'ReferencesSet' object.</returns> /// </summary> public ReferencesSet FindReferencesSet(FindReferencesSetStoredProcedure findReferencesSetProc, DataConnector databaseConnector) { // Initial Value ReferencesSet referencesSet = null; // Verify database connection is connected if ((databaseConnector != null) && (databaseConnector.Connected)) { // First Get Dataset DataSet referencesSetDataSet = this.DataHelper.LoadDataSet(findReferencesSetProc, databaseConnector); // Verify DataSet Exists if (referencesSetDataSet != null) { // Get DataTable From DataSet DataRow row = this.DataHelper.ReturnFirstRow(referencesSetDataSet); // if row exists if (row != null) { // Load ReferencesSet referencesSet = ReferencesSetReader.Load(row); } } } // return value return(referencesSet); }
/// <summary> /// Saves a 'ReferencesSet' object into the database. /// This method calls the 'Insert' or 'Update' method. /// </summary> /// <param name='referencesSet'>The 'ReferencesSet' object to save.</param> /// <returns>True if successful or false if not.</returns> public bool Save(ref ReferencesSet referencesSet) { // Initial value bool saved = false; // If the referencesSet exists. if (referencesSet != null) { // Is this a new ReferencesSet if (referencesSet.IsNew) { // Insert new ReferencesSet int newIdentity = this.Insert(referencesSet); // if insert was successful if (newIdentity > 0) { // Update Identity referencesSet.UpdateIdentity(newIdentity); // Set return value saved = true; } } else { // Update ReferencesSet saved = this.Update(referencesSet); } } // return value return(saved); }
/// <summary> /// The Data Operations References Set SelectedIndex has changed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DataOperationsReferencesSetCombobox_SelectedIndexChanged(object sender, EventArgs e) { // if the SelectedProject exists if (this.SelectedProject != null) { // Create the references set ReferencesSet refSet = this.DataOperationsReferencesSetCombobox.SelectedItem as ReferencesSet; // if the references set exists if (refSet != null) { // set refernces set this.SelectedReferencesSet = refSet; // Set references set this.SelectedProject.DataOperationsReferencesSet = refSet; // Set the DataOperationsReferencesSetID this.SelectedProject.DataOperationsReferencesSetId = refSet.ReferencesSetId; } // Enable Controls UIEnable(); } }
/// <summary> /// This method prepares this control to be launched. /// </summary> public void Setup(ReferencesSet referenceSet) { // clone the original set this.OriginalSet = referenceSet.Clone(); // Set selected references set this.SelectedReferencesSet = referenceSet; // set to Create string formText = "Create New References Set"; // if the reference exists if ((this.SelectedReferencesSet != null) && (!this.SelectedReferencesSet.IsNew)) { // set to edit formText = "Edit References Set"; } // Display References this.DisplayReferences(); // if the parent form exists if (this.ParentForm != null) { // set header text on the form this.ParentForm.Text = formText; } }
/// <summary> /// Create a new instance of ControllerManagerCreator /// </summary> public StoredProcedureObjectCreator(List <DataTable> dataTablesArg, ReferencesSet objectReferencesArg, string rootStoredProceduresPathArg, string nameSpaceNameArg, ProjectFileManager fileManager, TargetFrameworkEnum targetFramework) : base(fileManager, false, false, targetFramework) { // Set Properties this.DataTables = dataTablesArg; this.NameSpaceName = nameSpaceNameArg; this.RootStoredProceduresPath = rootStoredProceduresPathArg; this.ObjectReferences = objectReferencesArg; }
/// <summary> /// This event edits the controller refernces set. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditControllerReferencesSetButton_Click(object sender, EventArgs e) { // Edit the references set ReferencesSet refSet = ReferencesSetManager.EditReferencesSet(this.SelectedReferencesSet, this.SelectedProject); // Display selected references DisplaySelectedReferences(refSet); }
/// <summary> /// Edit the list of references /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditDataOperationsReferencesSet_Click(object sender, EventArgs e) { // Edit the references set ReferencesSet refSet = ReferencesSetManager.EditReferencesSet(this.SelectedReferencesSet, this.SelectedProject); // Display selected references DisplaySelectedReferences(refSet); }
/// <summary> /// Create a new instance of DataObjectReaderCreator /// </summary> public DataObjectReaderCreator(DataTable dataTableArg, ReferencesSet objectReferencesArg, string rootDataObjectPathArg, string nameSpaceNameArg, ProjectFileManager fileManager, TargetFrameworkEnum targetFramework) : base(fileManager, false, false, targetFramework) { // Set Properties this.DataTable = dataTableArg; this.NameSpaceName = nameSpaceNameArg; this.ObjectReferences = objectReferencesArg; this.RootDataObjectReaderPath = rootDataObjectPathArg; }
/// <summary> /// This method deletes a 'ReferencesSet' object. /// </summary> /// <param name='List<PolymorphicObject>'>The 'ReferencesSet' to delete. /// <returns>A PolymorphicObject object with a Boolean value. internal PolymorphicObject DeleteReferencesSet(List <PolymorphicObject> parameters, DataConnector dataConnector) { // Initial Value PolymorphicObject returnObject = new PolymorphicObject(); // If the data connection is connected if ((dataConnector != null) && (dataConnector.Connected == true)) { // Create Delete StoredProcedure DeleteReferencesSetStoredProcedure deleteReferencesSetProc = null; // verify the first parameters is a(n) 'ReferencesSet'. if (parameters[0].ObjectValue as ReferencesSet != null) { // Create ReferencesSet ReferencesSet referencesSet = (ReferencesSet)parameters[0].ObjectValue; // verify referencesSet exists if (referencesSet != null) { // Now create deleteReferencesSetProc from ReferencesSetWriter // The DataWriter converts the 'ReferencesSet' // to the SqlParameter[] array needed to delete a 'ReferencesSet'. deleteReferencesSetProc = ReferencesSetWriter.CreateDeleteReferencesSetStoredProcedure(referencesSet); } } // Verify deleteReferencesSetProc exists if (deleteReferencesSetProc != null) { // Execute Delete Stored Procedure bool deleted = this.DataManager.ReferencesSetManager.DeleteReferencesSet(deleteReferencesSetProc, dataConnector); // Create returnObject.Boolean returnObject.Boolean = new NullableBoolean(); // If delete was successful if (deleted) { // Set returnObject.Boolean.Value to true returnObject.Boolean.Value = NullableBooleanEnum.True; } else { // Set returnObject.Boolean.Value to false returnObject.Boolean.Value = NullableBooleanEnum.False; } } } else { // Raise Error Data Connection Not Available throw new Exception("The database connection is not available."); } // return value return(returnObject); }
/// <summary> /// Create a new instance of ControllerManagerCreator /// </summary> public DataOperationsManagerCreator(List <DataTable> dataTablesArg, ReferencesSet objectReferencesArg, string rootDataOperationsPathArg, string projectNameArg, string nameSpaceNameArg, ProjectFileManager fileManager, TargetFrameworkEnum targetFramework) : base(fileManager, false, false, targetFramework) { // Set Properties this.DataTables = dataTablesArg; this.ProjectName = projectNameArg; this.NameSpaceName = nameSpaceNameArg; this.RootDataOperationsPath = rootDataOperationsPathArg; this.ObjectReferences = objectReferencesArg; }
/// <summary> /// This method finds a 'ReferencesSet' object. /// </summary> /// <param name='List<PolymorphicObject>'>The 'ReferencesSet' to delete. /// <returns>A PolymorphicObject object with a Boolean value. internal PolymorphicObject FindReferencesSet(List <PolymorphicObject> parameters, DataConnector dataConnector) { // Initial Value PolymorphicObject returnObject = new PolymorphicObject(); // locals ReferencesSet referencesSet = null; // If the data connection is connected if ((dataConnector != null) && (dataConnector.Connected == true)) { // Create Find StoredProcedure FindReferencesSetStoredProcedure findReferencesSetProc = null; // verify the first parameters is a 'ReferencesSet'. if (parameters[0].ObjectValue as ReferencesSet != null) { // Get ReferencesSetParameter ReferencesSet paramReferencesSet = (ReferencesSet)parameters[0].ObjectValue; // verify paramReferencesSet exists if (paramReferencesSet != null) { // Now create findReferencesSetProc from ReferencesSetWriter // The DataWriter converts the 'ReferencesSet' // to the SqlParameter[] array needed to find a 'ReferencesSet'. findReferencesSetProc = ReferencesSetWriter.CreateFindReferencesSetStoredProcedure(paramReferencesSet); } // Verify findReferencesSetProc exists if (findReferencesSetProc != null) { // Execute Find Stored Procedure referencesSet = this.DataManager.ReferencesSetManager.FindReferencesSet(findReferencesSetProc, dataConnector); // if dataObject exists if (referencesSet != null) { // set returnObject.ObjectValue returnObject.ObjectValue = referencesSet; } } } else { // Raise Error Data Connection Not Available throw new Exception("The database connection is not available."); } } // return value return(returnObject); }
/// <summary> /// This method fetches all 'ReferencesSet' objects. /// </summary> /// <param name='List<PolymorphicObject>'>The 'ReferencesSet' to delete. /// <returns>A PolymorphicObject object with all 'ReferencesSets' objects. internal PolymorphicObject FetchAll(List <PolymorphicObject> parameters, DataConnector dataConnector) { // Initial Value PolymorphicObject returnObject = new PolymorphicObject(); // locals List <ReferencesSet> referencesSetListCollection = null; // Create FetchAll StoredProcedure FetchAllReferencesSetsStoredProcedure fetchAllProc = null; // If the data connection is connected if ((dataConnector != null) && (dataConnector.Connected == true)) { // Get ReferencesSetParameter // Declare Parameter ReferencesSet paramReferencesSet = null; // verify the first parameters is a(n) 'ReferencesSet'. if (parameters[0].ObjectValue as ReferencesSet != null) { // Get ReferencesSetParameter paramReferencesSet = (ReferencesSet)parameters[0].ObjectValue; } // Now create FetchAllReferencesSetsProc from ReferencesSetWriter fetchAllProc = ReferencesSetWriter.CreateFetchAllReferencesSetsStoredProcedure(paramReferencesSet); } // Verify fetchAllProc exists if (fetchAllProc != null) { // Execute FetchAll Stored Procedure referencesSetListCollection = this.DataManager.ReferencesSetManager.FetchAllReferencesSets(fetchAllProc, dataConnector); // if dataObjectCollection exists if (referencesSetListCollection != null) { // set returnObject.ObjectValue returnObject.ObjectValue = referencesSetListCollection; } } else { // Raise Error Data Connection Not Available throw new Exception("The database connection is not available."); } // return value return(returnObject); }
/// <summary> /// Deletes a 'ReferencesSet' from the database /// This method calls the DataBridgeManager to execute the delete using the /// procedure 'ReferencesSet_Delete'. /// </summary> /// <param name='referencesset'>The 'ReferencesSet' to delete.</param> /// <returns>True if the delete is successful or false if not.</returns> public bool Delete(ReferencesSet tempReferencesSet) { // locals bool deleted = false; // Get information for calling 'DataBridgeManager.PerformDataOperation' method. string methodName = "DeleteReferencesSet"; string objectName = "ApplicationLogicComponent.Controllers"; try { // verify tempreferencesSet exists before attemptintg to delete if (tempReferencesSet != null) { // Create Delegate For DataOperation ApplicationController.DataOperationMethod deleteReferencesSetMethod = this.AppController.DataBridge.DataOperations.ReferencesSetMethods.DeleteReferencesSet; // Create parameters for this method List <PolymorphicObject> parameters = CreateReferencesSetParameter(tempReferencesSet); // Perform DataOperation PolymorphicObject returnObject = this.AppController.DataBridge.PerformDataOperation(methodName, objectName, deleteReferencesSetMethod, parameters); // If return object exists if (returnObject != null) { // Test For True if (returnObject.Boolean.Value == NullableBooleanEnum.True) { // Set Deleted To True deleted = true; } } } } catch (Exception error) { // If ErrorProcessor exists if (this.ErrorProcessor != null) { // Log the current error this.ErrorProcessor.LogError(methodName, objectName, error); } } // return value return(deleted); }
/// <summary> /// This method creates the parameter for a 'ReferencesSet' data operation. /// </summary> /// <param name='referencesset'>The 'ReferencesSet' to use as the first /// parameter (parameters[0]).</param> /// <returns>A List<PolymorphicObject> collection.</returns> private List <PolymorphicObject> CreateReferencesSetParameter(ReferencesSet referencesSet) { // Initial Value List <PolymorphicObject> parameters = new List <PolymorphicObject>(); // Create PolymorphicObject to hold the parameter PolymorphicObject parameter = new PolymorphicObject(); // Set parameter.ObjectValue parameter.ObjectValue = referencesSet; // Add userParameter to parameters parameters.Add(parameter); // return value return(parameters); }
/// <summary> /// Create a new ReferencesSet. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void NewDataOperationsReferencesSetButton_Click(object sender, EventArgs e) { // create references set ReferencesSet refSet = ReferencesSetManager.CreateNewReferencesSet(this.SelectedProject); // if the refSet exists if (refSet != null) { // add this refernce to all references this.SelectedProject.AllReferences.Add(refSet); // set the references set this.SelectedProject.DataOperationsReferencesSet = refSet; } // Display selected references DisplaySelectedReferences(refSet); }
/// <summary> /// This method creates the sql Parameter[] array /// that holds the primary key value. /// </summary> /// <param name='referencesSet'>The 'ReferencesSet' to get the primary key of.</param> /// <returns>A SqlParameter[] array which contains the primary key value. /// to delete.</returns> internal static SqlParameter[] CreatePrimaryKeyParameter(ReferencesSet referencesSet) { // Initial Value SqlParameter[] parameters = new SqlParameter[1]; // verify user exists if (referencesSet != null) { // Create PrimaryKey Parameter SqlParameter @ReferencesSetId = new SqlParameter("@ReferencesSetId", referencesSet.ReferencesSetId); // Set parameters[0] to @ReferencesSetId parameters[0] = @ReferencesSetId; } // return value return(parameters); }
/// <summary> /// Finds a 'ReferencesSet' object by the primary key. /// This method used the DataBridgeManager to execute the 'Find' using the /// procedure 'ReferencesSet_Find'</param> /// </summary> /// <param name='tempReferencesSet'>A temporary ReferencesSet for passing values.</param> /// <returns>A 'ReferencesSet' object if found else a null 'ReferencesSet'.</returns> public ReferencesSet Find(ReferencesSet tempReferencesSet) { // Initial values ReferencesSet referencesSet = null; // Get information for calling 'DataBridgeManager.PerformDataOperation' method. string methodName = "Find"; string objectName = "ApplicationLogicComponent.Controllers"; try { // If object exists if (tempReferencesSet != null) { // Create DataOperation ApplicationController.DataOperationMethod findMethod = this.AppController.DataBridge.DataOperations.ReferencesSetMethods.FindReferencesSet; // Create parameters for this method List <PolymorphicObject> parameters = CreateReferencesSetParameter(tempReferencesSet); // Perform DataOperation PolymorphicObject returnObject = this.AppController.DataBridge.PerformDataOperation(methodName, objectName, findMethod, parameters); // If return object exists if ((returnObject != null) && (returnObject.ObjectValue as ReferencesSet != null)) { // Get ReturnObject referencesSet = (ReferencesSet)returnObject.ObjectValue; } } } catch (Exception error) { // If ErrorProcessor exists if (this.ErrorProcessor != null) { // Log the current error this.ErrorProcessor.LogError(methodName, objectName, error); } } // return value return(referencesSet); }
/// <summary> /// This method displays the selected referencesSet /// </summary> /// <param name="refSet"></param> private void DisplaySelectedReferences(ReferencesSet refSet) { // if refSet exists if (refSet != null) { // Load the references combo ReferencesSetManager.LoadReferencesSetComboBox(this.SelectedProject.AllReferences.ToList(), this.DataOperationsReferencesSetCombobox); // Get the selected index int index = this.DataOperationsReferencesSetCombobox.Items.IndexOf(refSet); // if the index exists if (index >= 0) { // set the selected index this.DataOperationsReferencesSetCombobox.SelectedIndex = index; } } }
/// <summary> /// Insert a 'ReferencesSet' object into the database. /// This method uses the DataBridgeManager to execute the 'Insert' using the /// procedure 'ReferencesSet_Insert'.</param> /// </summary> /// <param name='referencesSet'>The 'ReferencesSet' object to insert.</param> /// <returns>The id (int) of the new 'ReferencesSet' object that was inserted.</returns> public int Insert(ReferencesSet referencesSet) { // Initial values int newIdentity = -1; // Get information for calling 'DataBridgeManager.PerformDataOperation' method. string methodName = "Insert"; string objectName = "ApplicationLogicComponent.Controllers"; try { // If ReferencesSetexists if (referencesSet != null) { ApplicationController.DataOperationMethod insertMethod = this.AppController.DataBridge.DataOperations.ReferencesSetMethods.InsertReferencesSet; // Create parameters for this method List <PolymorphicObject> parameters = CreateReferencesSetParameter(referencesSet); // Perform DataOperation PolymorphicObject returnObject = this.AppController.DataBridge.PerformDataOperation(methodName, objectName, insertMethod, parameters); // If return object exists if (returnObject != null) { // Set return value newIdentity = returnObject.IntegerValue; } } } catch (Exception error) { // If ErrorProcessor exists if (this.ErrorProcessor != null) { // Log the current error this.ErrorProcessor.LogError(methodName, objectName, error); } } // return value return(newIdentity); }
/// <summary> /// This method Updates a 'ReferencesSet' object in the database. /// This method used the DataBridgeManager to execute the 'Update' using the /// procedure 'ReferencesSet_Update'.</param> /// </summary> /// <param name='referencesSet'>The 'ReferencesSet' object to update.</param> /// <returns>True if successful else false if not.</returns> public bool Update(ReferencesSet referencesSet) { // Initial value bool saved = false; // Get information for calling 'DataBridgeManager.PerformDataOperation' method. string methodName = "Update"; string objectName = "ApplicationLogicComponent.Controllers"; try { if (referencesSet != null) { // Create Delegate ApplicationController.DataOperationMethod updateMethod = this.AppController.DataBridge.DataOperations.ReferencesSetMethods.UpdateReferencesSet; // Create parameters for this method List <PolymorphicObject> parameters = CreateReferencesSetParameter(referencesSet); // Perform DataOperation PolymorphicObject returnObject = this.AppController.DataBridge.PerformDataOperation(methodName, objectName, updateMethod, parameters); // If return object exists if ((returnObject != null) && (returnObject.Boolean != null) && (returnObject.Boolean.Value == NullableBooleanEnum.True)) { // Set saved to true saved = true; } } } catch (Exception error) { // If ErrorProcessor exists if (this.ErrorProcessor != null) { // Log the current error this.ErrorProcessor.LogError(methodName, objectName, error); } } // return value return(saved); }
/// <summary> /// This method prepares this control to create or edit a project reference. /// </summary> /// <param name="selectedReference"></param> public void Setup(ProjectReference selectedReferenceArg, ReferencesSet parentReferenceSetArg) { // The ProjectReference being created or edited. this.SelectedReference = selectedReferenceArg; // Set ParentReferenceSet this.ParentReferenceSet = parentReferenceSetArg; // if the selected reference exists if (this.SelectedReference != null) { // clone the SelectedReference so we can check for changes this.OriginalReference = this.SelectedReference.Clone(); // If the SelectedReference is new if (this.SelectedReference.IsNew) { // Edit the selected reference this.ParentForm.Text = "Create New Reference"; } else { // Edit the selected reference this.ParentForm.Text = "Edit Reference"; } // Display this.ReferenceTextBox.Text = this.SelectedReference.ReferenceName; } else { // The reference text box\ this.ReferenceTextBox.Text = ""; // set the OriginalReference to null since we do not have a SelectedReference this.OriginalReference = null; } // Enable the Save button UIEnable(); }
void Start() { GameManager.Instance.StateChanged += OnGameStateChanged; void OnGameStateChanged(GameState e) { var inGame = e == GameState.InGameMultiplayer || e == GameState.InGameSingleplayer; if (inGame) { GetReferences(); return; } void GetReferences() { if (descriptionUISystem == null) { descriptionUISystem = DescriptionUISystem; } UICanvas = GameObject.FindWithTag("UICanvas").GetComponent <Canvas>(); WorldCanvas = GameObject.FindWithTag("WorldCanvas").GetComponent <Canvas>(); CellParent = GameObject.FindWithTag("CellParent").transform; SpiritParent = GameObject.FindWithTag("SpiritParent").transform; EnemyParent = GameObject.FindWithTag("EnemyParent").transform; DescriptionUISystem = Instantiate(descriptionUISystem, UICanvas.transform); if (GameManager.Instance.GameState == GameState.InGameSingleplayer) { ReferencesSet?.Invoke(); } } } }
/// <summary> /// This method loads a 'ReferencesSet' object /// from the dataRow passed in. /// </summary> /// <param name='dataRow'>The 'DataRow' to load from.</param> /// <returns>A 'ReferencesSet' DataObject.</returns> public static ReferencesSet Load(DataRow dataRow) { // Initial Value ReferencesSet referencesSet = new ReferencesSet(); // Create field Integers int projectIdfield = 0; int referencesSetIdfield = 1; int referencesSetNamefield = 2; try { // Load Each field referencesSet.ProjectId = DataHelper.ParseInteger(dataRow.ItemArray[projectIdfield], 0); referencesSet.UpdateIdentity(DataHelper.ParseInteger(dataRow.ItemArray[referencesSetIdfield], 0)); referencesSet.ReferencesSetName = DataHelper.ParseString(dataRow.ItemArray[referencesSetNamefield]); } catch { } // return value return(referencesSet); }
/// <summary> /// This method loads a collection of 'ReferencesSet' objects. /// from the dataTable.Rows object passed in. /// </summary> /// <param name='dataTable'>The 'DataTable.Rows' to load from.</param> /// <returns>A ReferencesSet Collection.</returns> public static List <ReferencesSet> LoadCollection(DataTable dataTable) { // Initial Value List <ReferencesSet> referencesSets = new List <ReferencesSet>(); try { // Load Each row In DataTable foreach (DataRow row in dataTable.Rows) { // Create 'ReferencesSet' from rows ReferencesSet referencesSet = Load(row); // Add this object to collection referencesSets.Add(referencesSet); } } catch { } // return value return(referencesSets); }
/// <summary> /// This method creates an instance of a /// 'FindReferencesSetStoredProcedure' object and /// creates the sql parameter[] array needed /// to execute the procedure 'ReferencesSet_Find'. /// </summary> /// <param name="referencesSet">The 'ReferencesSet' to use to /// get the primary key parameter.</param> /// <returns>An instance of an FetchUserStoredProcedure</returns> public static FindReferencesSetStoredProcedure CreateFindReferencesSetStoredProcedure(ReferencesSet referencesSet) { // Initial Value FindReferencesSetStoredProcedure findReferencesSetStoredProcedure = null; // verify referencesSet exists if (referencesSet != null) { // Instanciate findReferencesSetStoredProcedure findReferencesSetStoredProcedure = new FindReferencesSetStoredProcedure(); // Now create parameters for this procedure findReferencesSetStoredProcedure.Parameters = CreatePrimaryKeyParameter(referencesSet); } // return value return(findReferencesSetStoredProcedure); }
/// <summary> /// This method creates an instance of an /// 'DeleteReferencesSet'StoredProcedure' object and /// creates the sql parameter[] array needed /// to execute the procedure 'ReferencesSet_Delete'. /// </summary> /// <param name="referencesSet">The 'ReferencesSet' to Delete.</param> /// <returns>An instance of a 'DeleteReferencesSetStoredProcedure' object.</returns> public static DeleteReferencesSetStoredProcedure CreateDeleteReferencesSetStoredProcedure(ReferencesSet referencesSet) { // Initial Value DeleteReferencesSetStoredProcedure deleteReferencesSetStoredProcedure = new DeleteReferencesSetStoredProcedure(); // Now Create Parameters For The DeleteProc deleteReferencesSetStoredProcedure.Parameters = CreatePrimaryKeyParameter(referencesSet); // return value return(deleteReferencesSetStoredProcedure); }
/// <summary> /// This method creates an instance of a /// 'FetchAllReferencesSetsStoredProcedure' object and /// creates the sql parameter[] array needed /// to execute the procedure 'ReferencesSet_FetchAll'. /// </summary> /// <returns>An instance of a(n) 'FetchAllReferencesSetsStoredProcedure' object.</returns> public static FetchAllReferencesSetsStoredProcedure CreateFetchAllReferencesSetsStoredProcedure(ReferencesSet referencesSet) { // Initial value FetchAllReferencesSetsStoredProcedure fetchAllReferencesSetsStoredProcedure = new FetchAllReferencesSetsStoredProcedure(); // return value return(fetchAllReferencesSetsStoredProcedure); }
/// <summary> /// This method creates an instance of an /// 'UpdateReferencesSetStoredProcedure' object and /// creates the sql parameter[] array needed /// to execute the procedure 'ReferencesSet_Update'. /// </summary> /// <param name="referencesSet"The 'ReferencesSet' object to update</param> /// <returns>An instance of a 'UpdateReferencesSetStoredProcedure</returns> public static UpdateReferencesSetStoredProcedure CreateUpdateReferencesSetStoredProcedure(ReferencesSet referencesSet) { // Initial Value UpdateReferencesSetStoredProcedure updateReferencesSetStoredProcedure = null; // verify referencesSet exists if (referencesSet != null) { // Instanciate updateReferencesSetStoredProcedure updateReferencesSetStoredProcedure = new UpdateReferencesSetStoredProcedure(); // Now create parameters for this procedure updateReferencesSetStoredProcedure.Parameters = CreateUpdateParameters(referencesSet); } // return value return(updateReferencesSetStoredProcedure); }