public void AddOtherLines(string SqlWhereClause) { int idFld = m_OtherLinesFC.FindField("OtherLines_ID"); int typeFld = m_OtherLinesFC.FindField("Type"); int locConfFld = m_OtherLinesFC.FindField("LocationConfidenceMeters"); int exConfFld = m_OtherLinesFC.FindField("ExistenceConfidence"); int idConfFld = m_OtherLinesFC.FindField("IdentityConfidence"); int lblFld = m_OtherLinesFC.FindField("Label"); int notesFld = m_OtherLinesFC.FindField("Notes"); int dsFld = m_OtherLinesFC.FindField("DataSourceID"); int symFld = m_OtherLinesFC.FindField("Symbol"); IQueryFilter QF = new QueryFilterClass(); QF.WhereClause = SqlWhereClause; IFeatureCursor theCursor = m_OtherLinesFC.Search(QF, false); IFeature theFeature = theCursor.NextFeature(); while (theFeature != null) { OtherLine anOtherLine = new OtherLine(); anOtherLine.OtherLines_ID = theFeature.get_Value(idFld).ToString(); anOtherLine.Type = theFeature.get_Value(typeFld).ToString(); anOtherLine.LocationConfidenceMeters = double.Parse(theFeature.get_Value(locConfFld).ToString()); anOtherLine.ExistenceConfidence = theFeature.get_Value(exConfFld).ToString(); anOtherLine.IdentityConfidence = theFeature.get_Value(idConfFld).ToString(); anOtherLine.Label = theFeature.get_Value(lblFld).ToString(); anOtherLine.Notes = theFeature.get_Value(notesFld).ToString(); anOtherLine.DataSourceID = theFeature.get_Value(dsFld).ToString(); anOtherLine.Symbol = theFeature.get_Value(symFld).ToString(); anOtherLine.Shape = (IPolyline)theFeature.Shape; anOtherLine.RequiresUpdate = true; m_OtherLinesDictionary.Add(anOtherLine.OtherLines_ID, anOtherLine); theFeature = theCursor.NextFeature(); } }
public void DeleteOtherLines(OtherLine theOtherLine) { try { m_OtherLinesDictionary.Remove(theOtherLine.OtherLines_ID); } catch { } IEditor theEditor = ArcMap.Editor; if (theEditor.EditState == esriEditState.esriStateNotEditing) { theEditor.StartEditing(m_theWorkspace); } theEditor.StartOperation(); try { IQueryFilter QF = new QueryFilterClass(); QF.WhereClause = "OtherLines_ID = '" + theOtherLine.OtherLines_ID + "'"; ITable OtherLinesTable = m_OtherLinesFC as ITable; OtherLinesTable.DeleteSearchedRows(QF); theEditor.StopOperation("Delete OtherLines"); } catch (Exception e) { theEditor.StopOperation("OtherLines Management Failure"); } }
public void UpdateOtherLine(OtherLine theOtherLine) { try { m_OtherLinesDictionary.Remove(theOtherLine.OtherLines_ID); } catch { } theOtherLine.RequiresUpdate = true; m_OtherLinesDictionary.Add(theOtherLine.OtherLines_ID, theOtherLine); }
public string NewOtherLine(string Type, double LocationConfidenceMeters, string ExistenceConfidence, string IdentityConfidence, string Label, string Notes, string DataSourceID, string Symbol, IPolyline Shape) { OtherLine newOtherLine = new OtherLine(); sysInfo SysInfoTable = new sysInfo(m_theWorkspace); newOtherLine.OtherLines_ID = SysInfoTable.ProjAbbr + ".OtherLines." + SysInfoTable.GetNextIdValue("OtherLines"); newOtherLine.Type = Type; newOtherLine.LocationConfidenceMeters = LocationConfidenceMeters; newOtherLine.ExistenceConfidence = ExistenceConfidence; newOtherLine.IdentityConfidence = IdentityConfidence; newOtherLine.Label = Label; newOtherLine.Notes = Notes; newOtherLine.DataSourceID = DataSourceID; newOtherLine.Symbol = Symbol; newOtherLine.Shape = Shape; newOtherLine.RequiresUpdate = false; m_OtherLinesDictionary.Add(newOtherLine.OtherLines_ID, newOtherLine); return newOtherLine.OtherLines_ID; }