А кто его знает какую версию... Вот кусок кода, которым производится изменение элементов
public void EditFeature(string Id, IGeometry igeom, string layerName, params DatasetParameter[] parameters)
{
IServerContext context = GetServerContext();
try
{
IMapServer ms = context.ServerObject as IMapServer;
IMapServerObjects pMapServerObjs = ms as IMapServerObjects;
IMap pMap = pMapServerObjs.get_Map(ms.DefaultMapName);
IFeatureLayer pFLayer = null;
ILayer il = BaseServerTools.GetLayerByName(layerName,pMap);
if (il == null)
throw new GISLayerNotFoundException(null,layerName);
pFLayer = il as IFeatureLayer;
IFeatureClass pFeatureClass = pFLayer.FeatureClass;
IDataset dataset = pFeatureClass as IDataset;
IWorkspace workspace = dataset.Workspace;
IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace;
try
{
workspaceEdit.StartEditing(false);
workspaceEdit.StartEditOperation();
IFeature f = GetFeature(pFeatureClass, Convert.ToInt32(Id));
if (f == null)
{
workspaceEdit.StopEditOperation();
workspaceEdit.StopEditing(false);
return;
}
if (parameters != null)
{
foreach (DatasetParameter d in parameters)
{
f.set_Value(pFeatureClass.FindField(d.FieldName), d.FieldValue);
}
}
if (igeom != null)
{
f.Shape = igeom;
}
f.Store();
workspaceEdit.StopEditOperation();
workspaceEdit.StopEditing(true);
}
catch (Exception ex)
{
workspaceEdit.StopEditOperation();
workspaceEdit.StopEditing(false);
throw new GISOperationException(ex, GISOperationType.Update);
}
}
finally
{
ReleaseContext(context);
}
}
Что-то неправильно? И как сюда прикрутить версионность?