/// <summary> /// This function allows the Remote Data Store to add a new baseline definition to its baselines list. /// </summary> /// <param name="pBLDef">The new baseline.</param> public void mSetNewBaselineDefinition(DataContainer pBLDef) { Dictionary <String, String> lDictio = new Dictionary <String, String>(); pBLDef.restart(); pBLDef.read(); for (int i = 0; i < pBLDef.fieldCount(); i++) { lDictio[pBLDef.getName(i)] = pBLDef.getValue(i); } lock (_SQLWrapper) { _SQLWrapper.mInsert(_baselinesDataStore, lDictio); } }
/// <summary> /// This function allows the Remote Data Store to add a new data package version to its data package files data store. /// </summary> /// <param name="pNDPkg">The new data package description.</param> public void mSetNewDataPackage(DataContainer pNDPkg) { //create dictionnary for insert operation Dictionary <String, String> lDictio = new Dictionary <String, String>(); pNDPkg.restart(); pNDPkg.read(); for (int i = 0; i < pNDPkg.fieldCount(); i++) { lDictio[pNDPkg.getName(i)] = pNDPkg.getValue(i); } lock (_SQLWrapper) { _SQLWrapper.mInsert(_dataPackagesDataStore, lDictio); } }
/// <summary>Saves a baseline distributing task.</summary> /// <param name="baselineDistributingTask">The baseline distributing task.</param> public void mSaveBaselineDistributingTask(DataContainer baselineDistributingTask) { string elementId = string.Empty; Dictionary <string, string> newValuesDictionnary = new Dictionary <string, string>(); baselineDistributingTask.restart(); baselineDistributingTask.read(); for (int i = 0; i < baselineDistributingTask.fieldCount(); i++) { newValuesDictionnary[baselineDistributingTask.getName(i)] = baselineDistributingTask.getValue(i); if (baselineDistributingTask.getName(i).Equals("ElementID")) { elementId = baselineDistributingTask.getValue(i); } } mDeleteBaselineDistributingTask(elementId); lock (_SQLWrapper) { _SQLWrapper.mInsert(_baselineDistributingTasksDataStore, newValuesDictionnary); } }
public override bool Equals(object obj) { DataContainer lDC = obj as DataContainer; if ((object)lDC == null) { return(false); } bool lResult = true; if (System.Object.ReferenceEquals(this.Columns, lDC.Columns)) { lResult = true; } else { if (((object)this.Columns == null) || ((object)lDC.Columns == null)) { lResult = false; } else { if (this.Columns.Count != lDC.Columns.Count) { lResult = false; } else { if (System.Object.ReferenceEquals(this.Rows, this.Rows)) { lResult = true; } else { if (((object)this.Rows == null) || ((object)this.Rows == null)) { lResult = false; } else { if (this.Rows.Count != lDC.Rows.Count) { lResult = false; } else { for (int i = 0; i < this.Columns.Count; i++) { if (this.Columns[i] != lDC.Columns[i]) { lResult = false; } } if (lResult) { this.restart(); lDC.restart(); while (this.read() && lDC.read()) { for (int i = 0; i < this.fieldCount(); i++) { if (this.getValue(i) != lDC.getValue(i)) { lResult = false; } } } } } } } } } } return(base.Equals(obj) && lResult); }