string filename = @”c:\osman.py”;
System.Diagnostics.Process prc = new System.Diagnostics.Process();
prc.StartInfo.FileName = filename;
prc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
prc.Start();
prc.WaitForExit();
prc.Close();
int resource_index = 1;
ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality mfdesc = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality)Map1.GetFunctionality(resource_index);
MapDescription mapDescription = mfdesc.MapDescription;
string definitionExpression = mapDescription.LayerDescriptions[0].DefinitionExpression.ToString();
ESRI.ArcGIS.Server.WebControls.ServerConnection connection;
connection = new ESRI.ArcGIS.Server.WebControls.ServerConnection();
connection.Host = “hostun adi”;
connection.Connect();
IServerContext ctx = connection.ServerObjectManager.CreateServerContext(”ArcGis Service in adı”, “MapServer”);
IMapServer mapsrv = ctx.ServerObject as IMapServer;
IMapServerObjects mapo = mapsrv as IMapServerObjects;
IMap map = mapo.get_Map(mapsrv.DefaultMapName);
int ActiveLayerIndex = GetQueryLayers(”katmanin toc/mxd de gorunen adi”, “map resource un katman adi”);
int ActiveLayerIndex = GetQueryLayers(”ist_binalar”, “Veri_Katmani”);
IFeatureLayer flayer = map.get_Layer(ActiveLayerIndex) as IFeatureLayer;
IAttributeTable attTable = (IAttributeTable)flayer;
int fieldCount = attTable.AttributeTable.Fields.FieldCount;
attTable.AttributeTable.Fields.get_Field(1).Name;
string TableObjectIdName = attTable.AttributeTable.OIDFieldName;