Commit 5c07da6f authored by chenh@southgnss.com's avatar chenh@southgnss.com

第一次版本提交

parent ef9cded2
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/********************************************************************************
** auth: * *
** date: 2017-07-20 19:43:14
** desc: 尚未编写描述
*********************************************************************************/
using System.Configuration;
namespace SouthSmart.GISService.Infrastructure
{
public static class ConfigOperator
{
#region 从配置文件获取Value
/// <summary>
/// 从配置文件获取Value
/// </summary>
/// <param name="key">配置文件中key字符串</param>
/// <returns></returns>
public static string GetValueFromConfig ( string key )
{
try
{
Configuration config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None );
//获取AppSettings的节点
AppSettingsSection appsection = ( AppSettingsSection ) config.GetSection( "appSettings" );
return appsection.Settings [key].Value;
}
catch
{
return "";
}
}
#endregion
#region 设置配置文件
/// <summary>
/// 设置配置文件
/// </summary>
/// <param name="key">配置文件中key字符串</param>
/// <param name="value">配置文件中value字符串</param>
/// <returns></returns>
public static bool SetValueFromConfig ( string key , string value )
{
try
{
//打开配置文件
Configuration config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None );
//获取AppSettings的节点
AppSettingsSection appsection = ( AppSettingsSection ) config.GetSection( "appSettings" );
appsection.Settings [key].Value = value;
config.Save();
return true;
}
catch
{
return false;
}
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using SouthSmart.GISService.Infrastructure.WebGIS;
namespace SouthSmart.GISService.Infrastructure.Module
{
public static class ArcgisJsonHelper
{
public static WebGISPolygon GeometryConvert2WebGISPolygon ( this IGeometry geometry )
{
//图形转为点集
IPointCollection pPointColl = geometry as IPointCollection;
if ( pPointColl.PointCount == 0 )
{
return null;
}
var listPositionArr = new List<List<double[]>> ();
var listPosition = new List<double[]> ();
//遍历点集
for ( int j = 0; j < pPointColl.PointCount; j++ )
{
var point = pPointColl.get_Point ( j );
//输出点坐标
listPosition.Add ( new double[] { point.X, point.Y } );
}
if ( listPosition.Count >= 4 )
{
if ( listPosition[0][0] == listPosition[listPosition.Count - 1][0] && listPosition[0][1] == listPosition[listPosition.Count - 1][1] )
{
listPositionArr.Add ( listPosition );
var polygon = new WebGISPolygon ()
{
rings = listPositionArr,
type = "polygon",
spatialReference = new WebGISSpatialReference () { wkid = Convert.ToInt32 ( ConfigurationManager.AppSettings["SpatialReference"] ) }
};
return polygon;
}
}
else
{
return null;
}
return null;
}
public static List<Infrastructure.WebGIS.WebGISPolygon> FeaturesConvert2WebGISPolygon ( this List<IFeature> features )
{
var listGeometry = new List<Infrastructure.WebGIS.WebGISPolygon> ();
for ( int i = 0; i < features.Count; i++ )
{
var thisFeature = features[i];
switch ( features[i].Shape.GeometryType )
{
case esriGeometryType.esriGeometryPolygon:
var geometryConvert = thisFeature.Shape.GeometryConvert2WebGISPolygon ();
if ( geometryConvert != null )
listGeometry.Add ( geometryConvert );
break;
default:
throw new ArgumentOutOfRangeException ();
}
}
return listGeometry;
}
public static List<Infrastructure.WebGIS.WebGISPolygon> GeometryConvert2WebGISPolygon ( this List<IGeometry> geometrys )
{
var listGeometry = new List<Infrastructure.WebGIS.WebGISPolygon> ();
for ( int i = 0; i < geometrys.Count; i++ )
{
var geometry = geometrys[i];
switch ( geometrys[i].GeometryType )
{
case esriGeometryType.esriGeometryPolygon:
var geometryConvert = geometry.GeometryConvert2WebGISPolygon ();
if ( geometryConvert != null )
listGeometry.Add ( geometryConvert );
break;
default:
throw new ArgumentOutOfRangeException ();
}
}
return listGeometry;
}
public static string GeometryToJsonString ( this IGeometry geometry )
{
try
{
IJSONWriter jsonWriter = new JSONWriterClass ();
jsonWriter.WriteToString ();
JSONConverterGeometryClass jsonCon = new JSONConverterGeometryClass ();
jsonCon.WriteGeometry ( jsonWriter, null, geometry, false );
return Encoding.UTF8.GetString ( jsonWriter.GetStringBuffer () );
}
catch ( Exception ex )
{
throw ex;
}
}
/// <summary>
/// JSON字符串转成IGeometry
/// </summary>
public static IGeometry GeometryFromJsonString ( string strJson, esriGeometryType type, bool bHasZ, bool bHasM )
{
try
{
IJSONReader jsonReader = new JSONReaderClass ();
jsonReader.ReadFromString ( strJson );
JSONConverterGeometryClass jsonCon = new JSONConverterGeometryClass ();
return jsonCon.ReadGeometry ( jsonReader, type, bHasZ, bHasM );
}
catch ( Exception ex )
{
throw ex;
}
}
}
}
\ No newline at end of file
using System;
using System.Collections;
using System.Collections.Generic;
using ESRI.ArcGIS.DataSourcesFile;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
namespace SouthSmart.GISService.Infrastructure.Module
{
public static class FeatureClassHelper
{
//属性查询
public static List<IFeature> FeatureSearch ( this IFeatureClass featureClass, IQueryFilter filter )
{
var features = new List<IFeature> ();
IFeature pFeature;
IFeatureCursor pFCursor = featureClass.Search ( filter, false );
pFeature = pFCursor.NextFeature (); // 第一个Feature
while ( pFeature != null ) // 如果是null就说明刚才那个是最后一个了,后面没有了
{
features.Add ( pFeature );
// 对pFeature作相应处理
pFeature = pFCursor.NextFeature (); // 下一个Feature
}
return features;
}
//空间查询
public static List<IFeature> FeatureSearch ( this IFeatureClass featureClass, IGeometry queryGeometry, esriSpatialRelEnum spatialRel )
{
//构造空间过滤器
ISpatialFilter spatialFilter = new SpatialFilterClass ();
spatialFilter.Geometry = queryGeometry;
spatialFilter.SpatialRel = spatialRel;
//在要素类上用空间过滤器进行查询即可
var features = new List<IFeature> ();
IFeature pFeature;
IFeatureCursor pFCursor = featureClass.Search ( spatialFilter, false );
pFeature = pFCursor.NextFeature (); // 第一个Feature
while ( pFeature != null ) // 如果是null就说明刚才那个是最后一个了,后面没有了
{
features.Add ( pFeature );
// 对pFeature作相应处理
pFeature = pFCursor.NextFeature (); // 下一个Feature
}
return features;
}
public static IPointCollection GetPointCollection ( this IGeometry drawGeo )
{
//判断绘制多边形是否为null,并不为空图形
if ( drawGeo != null && !drawGeo.IsEmpty )
{
//图形转为点集
IPointCollection pPointColl = drawGeo as IPointCollection;
////遍历点集
//for ( int i = 0; i < pPointColl.PointCount; i++ )
//{
// //获取点
// IPoint pPoint = pPointColl.get_Point ( i );
// //输出点坐标
// outputStr += ( "x:" + pPoint.X.ToString ( "f2" ) + ", y:" + pPoint.Y.ToString ( "f2" )+"\r\n" );
//}
return pPointColl;
}
return null;
}
public static List<IFeatureDataset> OpenCAD ( string workspacePath )
{
IWorkspaceFactory pWorkspaceFactory;
IFeatureWorkspace pFeatureWorkspace;
//打开CAD数据集
pWorkspaceFactory = new CadWorkspaceFactoryClass ();
pFeatureWorkspace = ( IFeatureWorkspace ) pWorkspaceFactory.OpenFromFile ( workspacePath, 0 );
var dataset = GetAllFeatureDataSet ( pFeatureWorkspace as IWorkspace );
return dataset;
}
/// <summary>
/// 获取所有要素集
/// </summary>
/// <param name="workspace">工作空间对象</param>
/// <returns>要素集列表</returns>
public static List<IFeatureDataset> GetAllFeatureDataSet ( IWorkspace workspace )
{
IEnumDataset dataset = workspace.get_Datasets ( esriDatasetType.esriDTFeatureDataset );
IFeatureDataset featureDataset = dataset.Next () as IFeatureDataset;
List<IFeatureDataset> featureDatasetList = new List<IFeatureDataset> ();
while ( featureDataset != null )
{
string name = featureDataset.Name;
featureDatasetList.Add ( featureDataset );
featureDataset = dataset.Next () as IFeatureDataset;
}
return featureDatasetList;
}
/// <summary>
/// 获取所有要素类
/// </summary>
/// <param name="featureDataset">要素集</param>
/// <returns>要素类列表</returns>
public static List<IFeatureClass> GetAllFeatureClass ( IFeatureDataset featureDataset )
{
IFeatureClassContainer featureClassContainer = ( IFeatureClassContainer ) featureDataset;
IEnumFeatureClass enumFeatureClass = featureClassContainer.Classes;
IFeatureClass featureClass = enumFeatureClass.Next ();
List<IFeatureClass> featureClassList = new List<IFeatureClass> ();
while ( featureClass != null )
{
featureClassList.Add ( featureClass );
featureClass = enumFeatureClass.Next ();
}
return featureClassList;
}
/// <summary>
/// 获取所有要素
/// </summary>
/// <param name="featureClass">要素类</param>
/// <returns>要素列表</returns>
public static List<IFeature> GetAllFeature ( IFeatureClass featureClass )
{
List<IFeature> featureList = new List<IFeature> ();
IFeatureCursor featureCursor = featureClass.Search ( null, false );
IFeature feature = featureCursor.NextFeature ();
while ( feature != null )
{
featureList.Add ( feature );
feature = featureCursor.NextFeature ();
}
return featureList;
}
//插入要素
public static void InsertFeature ( this IFeatureClass featureClass, IGeometry geometry, Hashtable hashTable )
{
try
{
IFeatureCursor featureLineCursor = featureClass.Insert ( true );
//将几何图形加入featureclass
IFeatureBuffer featureBuffer = featureClass.CreateFeatureBuffer ();
featureBuffer.Shape = geometry;
//遍历方法一:遍历哈希表中的键
foreach ( string key in hashTable.Keys )
{
int index = featureClass.Fields.FindField ( key );
if ( index == -1 )
{
continue;
}
featureBuffer.set_Value ( index, hashTable[key] );
}
featureLineCursor.InsertFeature ( featureBuffer );
featureLineCursor.Flush ();
}
catch ( Exception ex )
{
throw ex;
}
}
// 通过IFeature.Delete方法删除要素
public static void DeleteFeatures ( this IFeatureClass pFeatureclass, string strWhereClause )
{
IQueryFilter pQueryFilter = new QueryFilterClass ();
pQueryFilter.WhereClause = strWhereClause;
IFeatureCursor pFeatureCursor = pFeatureclass.Search ( pQueryFilter, false );
IFeature pFeature = pFeatureCursor.NextFeature ();
while ( pFeature != null )
{
pFeature.Delete ();
pFeature = pFeatureCursor.NextFeature ();
}
}
}
}
This diff is collapsed.
using ESRI.ArcGIS.Geometry;
namespace SouthSmart.GISService.Infrastructure.Module
{
public static class ProjectTrans
{
//坐标转换
public static IPoint PRJtoGCS(double x, double y)
{
IPoint pPoint = new PointClass();
pPoint.PutCoords(x, y);
pPoint.Z = 30;
ISpatialReferenceFactory pSRF = new SpatialReferenceEnvironmentClass();
pPoint.SpatialReference = pSRF.CreateProjectedCoordinateSystem((int)esriSRProjCS4Type.esriSRProjCS_Xian1980_3_Degree_GK_Zone_38);
pPoint.Project(pSRF.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984));
return pPoint;
}
}
}
using System;
using System.Configuration;
using ESRI.ArcGIS.DataSourcesGDB;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
namespace SouthSmart.GISService.Infrastructure.Module
{
public class SDEHelper
{
private IWorkspace _workspace;
/// <summary>
/// 数据工作空间
/// </summary>
public IWorkspace PWorkspace
{
get { return _workspace; }
set { _workspace = value; }
}
/// <summary>
/// 连接SDE数据库
/// </summary>
/// <returns></returns>
public void OpenData ()
{
try
{
string sdeConnectString = ConfigurationManager.ConnectionStrings["SDEConn"].ConnectionString;
string[] str = sdeConnectString.Split ( ';' );
IPropertySet pProperty = new PropertySetClass ();
pProperty.SetProperty ( "SERVER", str[0].Split ( '=' )[1] );
pProperty.SetProperty ( "INSTANCE", str[1].Split ( '=' )[1] );
pProperty.SetProperty ( "DATABASE", str[2].Split ( '=' )[1] );
pProperty.SetProperty ( "USER", str[3].Split ( '=' )[1] );
pProperty.SetProperty ( "PASSWORD", str[4].Split ( '=' )[1] );
pProperty.SetProperty ( "VERSION", str[5].Split ( '=' )[1] );
IWorkspaceFactory spaceFactory = new SdeWorkspaceFactoryClass ();
PWorkspace = spaceFactory.Open ( pProperty, 0 );//SDE连接
}
catch ( Exception ex )
{
throw ex;
}
}
/// <summary>
/// 打开空间数据表
/// </summary>
/// <param name="featureClassName"></param>
/// <returns></returns>
public IFeatureClass OpenFeatureClassByName ( string featureClassName )
{
if ( PWorkspace != null )
{
IFeatureWorkspace featureWorkspace = _workspace as IFeatureWorkspace;
if ( featureWorkspace != null )
{
IFeatureClass featureclass = featureWorkspace.OpenFeatureClass ( featureClassName );
return featureclass;
}
else
{
return null;
}
}
else
throw new Exception ( "您未打开空间数据库工作空间!" );
}
}
}
\ No newline at end of file
using System.Collections.Generic;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using Newtonsoft.Json;
namespace SouthSmart.GISService.Infrastructure.Module
{
//拓扑分析类
public static class TopoAnalyseHelper
{
public static IGeometry IntersectResult ( this IGeometry geometry, IGeometry tagGeometry )
{
ITopologicalOperator pTopological = ( geometry ) as ITopologicalOperator;
IGeometry pGeoIntersect = pTopological.Intersect ( tagGeometry, esriGeometryDimension.esriGeometry2Dimension );
return pGeoIntersect;
}
public static IGeometry DifferenceResult ( this IGeometry geometry, IGeometry tagGeometry )
{
ITopologicalOperator pTopological = ( geometry ) as ITopologicalOperator;
IGeometry pGeoIntersect = pTopological.Difference ( tagGeometry );
return pGeoIntersect;
}
public static bool TouchResult ( this IGeometry geometry, IGeometry tagGeometry )
{
IRelationalOperator2 pTopological = ( geometry ) as IRelationalOperator2;
bool isTouch = pTopological.Touches ( tagGeometry );
return isTouch;
}
public static IGeometry UnionResult ( this IGeometry geometry, IGeometry tagGeometry )
{
ITopologicalOperator2 pTopological = geometry as ITopologicalOperator2;
IGeometry pGeoUnion = pTopological.Union ( tagGeometry );
return pGeoUnion;
}
public static IGeometry BufferResult ( this IGeometry geometry, double distance )
{
ITopologicalOperator2 pTopological = geometry as ITopologicalOperator2;
IGeometry pGeoBuffer = pTopological.Buffer ( distance );
return pGeoBuffer;
}
//缝隙结果
public static IGeometry GapResult ( this IGeometry geometry, IGeometry tagGeometry )
{
IPolygon polygon = geometry as IPolygon;
IArea pArea = ( IArea ) polygon;
double area = pArea.Area;
polygon = tagGeometry as IPolygon;
pArea = ( IArea ) polygon;
area = pArea.Area;
ITopologicalOperator2 pTopological = geometry as ITopologicalOperator2;
IGeometry pGeoUnion = pTopological.Union ( tagGeometry );
polygon = pGeoUnion as IPolygon;
pArea = ( IArea ) polygon;
area = pArea.Area;
ITopologicalOperator2 pTopologica2 = pGeoUnion as ITopologicalOperator2;
IGeometry pGeoDifference2 = pTopologica2.Difference ( geometry );
polygon = pGeoDifference2 as IPolygon;
pArea = ( IArea ) polygon;
area = pArea.Area;
ITopologicalOperator2 pTopologica3 = pGeoDifference2 as ITopologicalOperator2;
IGeometry pGeoDifference3 = pTopologica3.Difference ( tagGeometry );
polygon = pGeoDifference3 as IPolygon;
pArea = ( IArea ) polygon;
area = pArea.Area;
return pGeoDifference3;
}
/*
#todo:esriSpatialRelUndefined
Used when the spatial relationship is not known at the time of object creation.
#todo:esriSpatialRelIntersects
Returns a feature if any spatial relationship is found.Applies to all shape type combinations.
#todo:esriSpatialRelEnvelopeIntersects
Returns a feature if the envelope of the two shapes intersects.
#todo:esriSpatialRelIndexIntersects
Returns a feature if the envelope of the query geometry intersects the index entry for the target geometry.Because it uses the underlying index grid, rather than the evelope of the feature, it is faster and is commonly used for return features for display purposes.
#todo:esriSpatialRelTouches
Returns a feature if the two shapes share a common boundary.However, the intersection of the interiors of the two shapes must be empty. In the Point/Line case, the point may touch an endpoint only of the line. Applies to all combinations except Point/Point.
#todo:esriSpatialRelOverlaps
Returns a feature if the intersection of the two shapes results in an object of the same dimension, but different from both of the shapes.Applies to Area/Area, Line/Line, and Multi-point/Multi-point shape type combinations.
#todo:esriSpatialRelCrosses
Returns a feature if the intersection of the interiors of the two shapes is not empty and has a lower dimension than the maximum dimension of the two shapes.Two lines that share an endpoint in common do not cross. Valid for Line/Line, Line/Area, Multi-point/Area, and Multi-point/Line shape type combinations.
#todo:esriSpatialRelWithin
Returns a feature if its shape wholly contains the search geometry.Valid for all shape type combinations.
#todo:esriSpatialRelContains
Returns a feature if its shape is wholly contained within the search geometry. Valid for all shape type combinations.
#todo:esriSpatialRelRelation
This is the expected value for ISpatialFilter::SpatialRel when using ISpatialFilter::SpatialRelDescription to define a custom spatial relationship.See the help on ISpatialFilter for details.
*/
}
}
\ No newline at end of file
using ESRI.ArcGIS;
using ESRI.ArcGIS.esriSystem;
namespace SouthSmart.GISService.Infrastructure.Module
{
public static class LicenseProduct
{
private static IAoInitialize m_AoInitialize;
#region 初始化许可
/// <summary>
/// 初始化许可
/// </summary>
public static void InitialLincese ()
{
ESRI.ArcGIS.RuntimeManager.Bind ( ESRI.ArcGIS.ProductCode.EngineOrDesktop );
if ( !RuntimeManager.Bind ( ProductCode.EngineOrDesktop ) )
{
return;
}
m_AoInitialize = new AoInitializeClass ();
esriLicenseStatus licenseStatus = esriLicenseStatus.esriLicenseUnavailable;
licenseStatus = m_AoInitialize.Initialize ( esriLicenseProductCode.esriLicenseProductCodeAdvanced );
if ( licenseStatus != esriLicenseStatus.esriLicenseCheckedOut )
{
licenseStatus = m_AoInitialize.Initialize ( esriLicenseProductCode.esriLicenseProductCodeEngineGeoDB );
if ( licenseStatus != esriLicenseStatus.esriLicenseCheckedOut )
{
return;
}
}
//迁出空间分析扩展模块
if ( m_AoInitialize.CheckOutExtension ( esriLicenseExtensionCode.esriLicenseExtensionCodeSpatialAnalyst ) != esriLicenseStatus.esriLicenseCheckedOut )
{
return;
}
}
#endregion
}
}
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("SouthSmart.GISService.Infrastructure")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SouthSmart.GISService.Infrastructure")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//将 ComVisible 设置为 false 将使此程序集中的类型
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("f5dbbe8d-baa6-4085-b235-1baecf841bb4")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F5DBBE8D-BAA6-4085-B235-1BAECF841BB4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SouthSmart.GISService.Infrastructure</RootNamespace>
<AssemblyName>SouthSmart.GISService.Infrastructure</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="ESRI.ArcGIS.DataSourcesFile, Version=10.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\Lib\ArcGIS\ESRI.ArcGIS.DataSourcesFile.dll</HintPath>
</Reference>
<Reference Include="ESRI.ArcGIS.DataSourcesGDB, Version=10.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\Lib\ArcGIS\ESRI.ArcGIS.DataSourcesGDB.dll</HintPath>
</Reference>
<Reference Include="ESRI.ArcGIS.Geodatabase, Version=10.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\Lib\ArcGIS\ESRI.ArcGIS.Geodatabase.dll</HintPath>
</Reference>
<Reference Include="ESRI.ArcGIS.Geometry, Version=10.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\Lib\ArcGIS\ESRI.ArcGIS.Geometry.dll</HintPath>
</Reference>
<Reference Include="ESRI.ArcGIS.System, Version=10.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\Lib\ArcGIS\ESRI.ArcGIS.System.dll</HintPath>
</Reference>
<Reference Include="ESRI.ArcGIS.Version, Version=10.1.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Lib\ArcGIS\ESRI.ArcGIS.Version.dll</HintPath>
</Reference>
<Reference Include="GeoJSON, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\GeoJSON.1.2.1\lib\net45\GeoJSON.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ConfigOperator.cs" />
<Compile Include="Module\ArcgisJsonHelper.cs" />
<Compile Include="Module\FeatureClassHelper.cs" />
<Compile Include="Module\GeoJsonHelper.cs" />
<Compile Include="Module\license.cs" />
<Compile Include="Module\ProjectTrans.cs" />
<Compile Include="Module\SDEHelper.cs" />
<Compile Include="Module\TopoAnalyseHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WebGIS\WebGISGeometry.cs" />
<Compile Include="WebGIS\WebGISPoint.cs" />
<Compile Include="WebGIS\WebGISPolygon.cs" />
<Compile Include="WebGIS\WebGISRings.cs" />
<Compile Include="WebGIS\WebGISSpatialReference.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=webgis/@EntryIndexedValue">False</s:Boolean></wpf:ResourceDictionary>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SouthSmart.GISService.Infrastructure.WebGIS
{
public class WebGISGeometry
{
public WebGISPolygon geometry { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SouthSmart.GISService.Infrastructure.WebGIS
{
public class WebGISPoint
{
public double x { get; set; }
public double y { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace SouthSmart.GISService.Infrastructure.WebGIS
{
public class WebGISPolygon
{
public List<List<double[]>> rings { get; set; }
public WebGISSpatialReference spatialReference { get; set; }
public string type { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SouthSmart.GISService.Infrastructure.WebGIS
{
public class WebGISRings
{
}
}
namespace SouthSmart.GISService.Infrastructure.WebGIS
{
public class WebGISSpatialReference
{
public int? wkid { get; set; }
//public string wkt { get; set; }
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="GeoJSON" version="1.2.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
</packages>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SouthSmart.GISService", "SouthSmart.GISService\SouthSmart.GISService.csproj", "{D5CFC57E-36A7-424C-98D5-473D23BCE70F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SouthSmart.GISService.Tests", "SouthSmart.GISService.Tests\SouthSmart.GISService.Tests.csproj", "{8617A78E-F2BF-4BC1-9C60-430D2AD80046}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SouthSmart.GISService.Infrastructure", "SouthSmart.GISService.Infrastructure\SouthSmart.GISService.Infrastructure.csproj", "{F5DBBE8D-BAA6-4085-B235-1BAECF841BB4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D5CFC57E-36A7-424C-98D5-473D23BCE70F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5CFC57E-36A7-424C-98D5-473D23BCE70F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5CFC57E-36A7-424C-98D5-473D23BCE70F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5CFC57E-36A7-424C-98D5-473D23BCE70F}.Release|Any CPU.Build.0 = Release|Any CPU
{8617A78E-F2BF-4BC1-9C60-430D2AD80046}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8617A78E-F2BF-4BC1-9C60-430D2AD80046}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8617A78E-F2BF-4BC1-9C60-430D2AD80046}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8617A78E-F2BF-4BC1-9C60-430D2AD80046}.Release|Any CPU.Build.0 = Release|Any CPU
{F5DBBE8D-BAA6-4085-B235-1BAECF841BB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5DBBE8D-BAA6-4085-B235-1BAECF841BB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5DBBE8D-BAA6-4085-B235-1BAECF841BB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F5DBBE8D-BAA6-4085-B235-1BAECF841BB4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;&#xD;
&lt;Assembly Path="D:\Project\SouthSmart.GISService\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll" /&gt;&#xD;
&lt;Assembly Path="D:\Project\SouthSmart.GISService\Lib\ArcGIS\ESRI.ArcGIS.Version.dll" /&gt;&#xD;
&lt;/AssemblyExplorer&gt;</s:String></wpf:ResourceDictionary>
\ No newline at end of file
using System.Web;
using System.Web.Optimization;
namespace SouthSmart.GISService
{
public class BundleConfig
{
// 有关绑定的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles ( BundleCollection bundles )
{
bundles.Add ( new ScriptBundle ( "~/bundles/jquery" ).Include (
"~/Scripts/jquery-{version}.js" ) );
bundles.Add ( new ScriptBundle ( "~/bundles/jqueryval" ).Include (
"~/Scripts/jquery.validate*" ) );
// 使用要用于开发和学习的 Modernizr 的开发版本。然后,当你做好
// 生产准备时,请使用 http://modernizr.com 上的生成工具来仅选择所需的测试。
bundles.Add ( new ScriptBundle ( "~/bundles/modernizr" ).Include (
"~/Scripts/modernizr-*" ) );
bundles.Add ( new ScriptBundle ( "~/bundles/bootstrap" ).Include (
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js" ) );
bundles.Add ( new StyleBundle ( "~/Content/css" ).Include (
"~/Content/bootstrap.css",
"~/Content/site.css" ) );
}
}
}
using System.Web;
using System.Web.Mvc;
namespace SouthSmart.GISService
{
public class FilterConfig
{
public static void RegisterGlobalFilters ( GlobalFilterCollection filters )
{
filters.Add ( new HandleErrorAttribute () );
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace SouthSmart.GISService
{
public class RouteConfig
{
public static void RegisterRoutes ( RouteCollection routes )
{
routes.IgnoreRoute ( "{resource}.axd/{*pathInfo}" );
routes.MapRoute (
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}
using System.Web.Mvc;
namespace SouthSmart.GISService.Areas.TopoAnalyse
{
public class TopoAnalyseAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "TopoAnalyse";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"TopoAnalyse_default",
"TopoAnalyse/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
}
}
}
\ No newline at end of file
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.Optimization" />
<add namespace="SouthSmart.GISService" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>
\ No newline at end of file
/********************************************************************************
** auth: 陈辉
** date: 2018年10月15日星期一 09:56:13
** desc: 尚未编写描述
*********************************************************************************/
using System;
using System.Data;
namespace SouthSmart.GISService.Attribute
{
/// <summary>
/// 自定义特性 属性或者类可用 支持继承
/// </summary>
[AttributeUsage ( AttributeTargets.Property | AttributeTargets.Class, Inherited = true )]
public class EnitityMappingAttribute : System.Attribute
{
private string tableName;
/// <summary>
/// 实体实际对应的表名
/// </summary>
public string TableName
{
get { return tableName; }
set { tableName = value; }
}
private string columnName;
/// <summary>
/// 中文列名
/// </summary>
public string ColumnName
{
get { return columnName; }
set { columnName = value; }
}
private DbType columnType;
/// <summary>
/// 中文列名
/// </summary>
public DbType ColumnType
{
get { return columnType; }
set { columnType = value; }
}
private string columnSize;
/// <summary>
/// 中文列名
/// </summary>
public string ColumnSize
{
get { return columnSize; }
set { columnSize = value; }
}
private string columnScale;
/// <summary>
/// 精度
/// </summary>
public string ColumnScale
{
get { return columnScale; }
set { columnScale = value; }
}
}
}

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
namespace SouthSmart.GISService
{
/// <summary>
/// 常用公共类
/// </summary>
public class Common
{
#region Stopwatch计时器
/// <summary>
/// 计时器开始
/// </summary>
/// <returns></returns>
public static Stopwatch TimerStart ()
{
Stopwatch watch = new Stopwatch();
watch.Reset();
watch.Start();
return watch;
}
/// <summary>
/// 计时器结束
/// </summary>
/// <param name="watch"></param>
/// <returns></returns>
public static string TimerEnd ( Stopwatch watch )
{
watch.Stop();
double costtime = watch.ElapsedMilliseconds;
return costtime.ToString();
}
#endregion
#region 删除数组中的重复项
/// <summary>
/// 删除数组中的重复项
/// </summary>
/// <param name="values"></param>
/// <returns></returns>
public static string [] RemoveDup ( string [] values )
{
List<string> list = new List<string>();
for ( int i = 0 ; i < values.Length ; i++ )//遍历数组成员
{
if ( !list.Contains( values [i] ) )
{
list.Add( values [i] );
};
}
return list.ToArray();
}
#endregion
#region 自动生成编号
/// <summary>
/// 表示全局唯一标识符 (GUID)。
/// </summary>
/// <returns></returns>
public static string GuId ()
{
return Guid.NewGuid().ToString();
}
/// <summary>
/// 自动生成编号 201008251145409865
/// </summary>
/// <returns></returns>
public static string CreateNo ()
{
Random random = new Random();
string strRandom = random.Next( 1000 , 10000 ).ToString(); //生成编号
string code = DateTime.Now.ToString( "yyyyMMddHHmmss" ) + strRandom;//形如
return code;
}
#endregion
#region 生成0-9随机数
/// <summary>
/// 生成0-9随机数
/// </summary>
/// <param name="codeNum">生成长度</param>
/// <returns></returns>
public static string RndNum ( int codeNum )
{
StringBuilder sb = new StringBuilder( codeNum );
Random rand = new Random();
for ( int i = 1 ; i < codeNum + 1 ; i++ )
{
int t = rand.Next( 9 );
sb.AppendFormat( "{0}" , t );
}
return sb.ToString();
}
#endregion
#region 删除最后一个字符之后的字符
/// <summary>
/// 删除最后结尾的一个逗号
/// </summary>
public static string DelLastComma ( string str )
{
return str.Substring( 0 , str.LastIndexOf( "," ) );
}
/// <summary>
/// 删除最后结尾的指定字符后的字符
/// </summary>
public static string DelLastChar ( string str , string strchar )
{
return str.Substring( 0 , str.LastIndexOf( strchar ) );
}
public static string FileName ( string str , char strchar )
{
return str.Substring( str.LastIndexOf( strchar ) + 1 );
}
/// <summary>
/// 删除最后结尾的长度
/// </summary>
/// <param name="str"></param>
/// <param name="Length"></param>
/// <returns></returns>
public static string DelLastLength ( string str , int Length )
{
if ( string.IsNullOrEmpty( str ) )
return "";
str = str.Substring( 0 , str.Length - Length );
return str;
}
#endregion
#region List<string> 转换为换行的字符串
public static string ListStr2Str ( List<string> listStr )
{
string outStr = "";
for ( int i = 0 ; i < listStr.Count ; i++ )
{
outStr += listStr [i] + "\r\n";
}
return outStr;
}
#endregion
}
}
<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
<!--oralce-->
<add name="OracleConn" providerName="System.Data.OralceClient" connectionString="" />
<!--sqlserver-->
<add name="SqlServerConn" providerName="System.Data.SqlClient" connectionString="" />
<!--oledbconn-->
<add name="OleDbConn" providerName="System.Data.OleDb" connectionString="" />
<!--SDEConn-->
<add name="SDEConn" providerName="System.Data.OralceClient" connectionString="SERVER=172.16.10.132;INSTANCE=sde:oracle11g:172.16.10.132/ORCL;DATABASE=orcl;USER=zzproject;PASSWORD=zzproject;VERSION=SDE.DEFAULT" />
</connectionStrings>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<appSettings>
<!-- ================== 4:系统环境变量 ================== -->
<!--设置系统主程序命名空间,程序集名称-->
<add key="CurrentAssembly" value="SouthSmart.GISService" />
<!--是否跨域-->
<add key="IsCrossDomain" value="true" />
<!--获取CAD文件的路径-->
<add key="CADTempFilePath" value="C:\Users\CHENHUI-PC\Desktop\CAD文件" />
<!--用于重叠分析图层-->
<add key="OverLapAnalyseLayer" value="CHTC" />
<!--用于超出分析图层-->
<add key="ExceedAnalyseLayer" value="GHTC" />
<!--用于缝隙分析的缓冲长度-->
<add key="BufferDistance" value="10" />
<!--用于入库图层-->
<add key="DataPushLayer" value="CHTC" />
<!--wikid-->
<add key="SpatialReference" value="4527" />
</appSettings>
\ No newline at end of file
body {
padding-top: 50px;
padding-bottom: 20px;
}
/* Set padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}
/* Override the default bootstrap behavior where horizontal description lists
will truncate terms that are too long to fit in the left column
*/
.dl-horizontal dt {
white-space: normal;
}
/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
max-width: 280px;
}
This diff is collapsed.
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace SouthSmart.GISService.Controllers
{
public class HomeController : Controller
{
public ActionResult Index ()
{
return View ();
}
public ActionResult About ()
{
ViewBag.Message = "Your application description page.";
return View ();
}
public ActionResult Contact ()
{
ViewBag.Message = "Your contact page.";
return View ();
}
}
}
\ No newline at end of file
<%@ Application Codebehind="Global.asax.cs" Inherits="SouthSmart.GISService.MvcApplication" Language="C#" %>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace SouthSmart.GISService
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
}
}
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using SouthSmart.GISService.Attribute;
namespace SouthSmart.GISService.Models
{
[EnitityMapping ( TableName = "CHXX" )]
public class CHXX
{
[EnitityMapping ( ColumnName = "业务号", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string YWH { get; set; }
[EnitityMapping ( ColumnName = "GHWH", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string GHWH { get; set; }
[EnitityMapping ( ColumnName = "TJH", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string TJH { get; set; }
[EnitityMapping ( ColumnName = "ZL", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string ZL { get; set; }
[EnitityMapping ( ColumnName = "SQR", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string SQR { get; set; }
[EnitityMapping ( ColumnName = "外业测量成果", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string WYCLCG { get; set; }
[EnitityMapping ( ColumnName = "测绘成果图", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string CHCGT { get; set; }
[EnitityMapping ( ColumnName = "定界图", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string DJT { get; set; }
[EnitityMapping ( ColumnName = "宗地图", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string ZDT { get; set; }
[EnitityMapping ( ColumnName = "地调表", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string DDB { get; set; }
[EnitityMapping ( ColumnName = "面积通知单", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string MJTZD { get; set; }
[EnitityMapping ( ColumnName = "其他成果", ColumnType = DbType.AnsiString, ColumnSize = "50", ColumnScale = "0" )]
public string QTCG { get; set; }
}
}
\ No newline at end of file
/********************************************************************************
** auth: 陈辉
** date: 2017-01-13 16:28:50
** desc: 是否跨域
*********************************************************************************/
using System.Configuration;
using System.Web.Mvc;
namespace SouthSmart.GISService.Models
{
/// <summary>
/// 跨域设置
/// </summary>
public static class CrossDomainSetting
{
public static ActionResult NewJson ( this object obj )
{
string isCrossDomain = ConfigurationManager.AppSettings["IsCrossDomain"];
if ( isCrossDomain == "true" )
{
return new JsonpResult () { Data = obj.ToJson () };
}
if ( isCrossDomain == "false" )
{
return new JsonResult () { Data = obj.ToJson () };
}
return null;
}
public static ActionResult String2Json ( this string jsonStr )
{
string isCrossDomain = ConfigurationManager.AppSettings["IsCrossDomain"];
if ( isCrossDomain == "true" )
{
return new JsonpResult () { Data = jsonStr };
}
if ( isCrossDomain == "false" )
{
return new JsonResult () { Data = jsonStr };
}
return null;
}
}
}
\ No newline at end of file
/*******************************************************************************
** auth: * *
** date: 2016-12-28 20:23:29
** desc: 尚未编写描述
*********************************************************************************/
using System.Collections.Generic;
using System.Data;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
namespace SouthSmart.GISService.Models
{
public static class Json
{
public static object ToJson(this string Json)
{
return Json == null ? null : JsonConvert.DeserializeObject(Json);
}
public static string ToJson(this object obj)
{
var timeConverter = new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" };
return JsonConvert.SerializeObject(obj, timeConverter);
}
public static string ToJson(this object obj, string datetimeformats)
{
var timeConverter = new IsoDateTimeConverter { DateTimeFormat = datetimeformats };
return JsonConvert.SerializeObject(obj, timeConverter);
}
public static T ToObject<T>(this string Json)
{
return Json == null ? default(T) : JsonConvert.DeserializeObject<T>(Json);
}
public static List<T> ToList<T>(this string Json)
{
return Json == null ? null : JsonConvert.DeserializeObject<List<T>>(Json);
}
public static DataTable ToTable(this string Json)
{
return Json == null ? null : JsonConvert.DeserializeObject<DataTable>(Json);
}
public static JObject ToJObject(this string Json)
{
return Json == null ? JObject.Parse("{}") : JObject.Parse(Json.Replace("&nbsp;", ""));
}
}
}
/********************************************************************************
** auth: * *
** date: 2017-01-06 09:31:33
** desc: 尚未编写描述
*********************************************************************************/
using System.Web.Mvc;
namespace SouthSmart.GISService.Models
{
public class JsonpResult : JsonResult
{
public JsonpResult()
{
JsonRequestBehavior = JsonRequestBehavior.AllowGet;
}
public string Callback { get; set; }
///<summary>
///对操作结果进行处理
///</summary>
public override void ExecuteResult(ControllerContext context)
{
var httpContext = context.HttpContext;
if (string.IsNullOrWhiteSpace(Callback))
Callback = httpContext.Request["callback"]; //获得客户端提交的回调函数名称
// 返回客户端定义的回调函数
httpContext.Response.Write(Callback + "(");
httpContext.Response.Write(Data); //Data 是服务器返回的数据
httpContext.Response.Write(");"); //将函数输出给客户端,由客户端执行
}
}
}
B/// <autosync enabled="true" />
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* NUGET: BEGIN LICENSE TEXT
*
* Microsoft grants you the right to use these script files for the sole
* purpose of either: (i) interacting through your browser with the Microsoft
* website or online service, subject to the applicable licensing or use
* terms; or (ii) using the files as included with a Microsoft product subject
* to that product's license terms. Microsoft reserves all other rights to the
* files not expressly granted by Microsoft, whether by implication, estoppel
* or otherwise. Insofar as a script file is dual licensed under GPL,
* Microsoft neither took the code under GPL nor distributes it thereunder but
* under the terms set out in this paragraph. All notices and licenses
* below are for informational purposes only.
*
* NUGET: END LICENSE TEXT */
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='&shy;<style media="'+h+'"> #mq-test-1 { width: 42px; }</style>';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document);
/*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B<y;B++){A=D[B],z=A.href,C=A.media,x=A.rel&&A.rel.toLowerCase()==="stylesheet";if(!!z&&x&&!o[z]){if(A.styleSheet&&A.styleSheet.rawCssText){m(A.styleSheet.rawCssText,z,C);o[z]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(z)&&!g)||z.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:z,media:C})}}}}u()},u=function(){if(d.length){var x=d.shift();n(x.href,function(y){m(y,x.href,x.media);o[x.href]=true;u()})}},m=function(I,x,z){var G=I.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),J=G&&G.length||0,x=x.substring(0,x.lastIndexOf("/")),y=function(K){return K.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+x+"$2$3")},A=!J&&z,D=0,C,E,F,B,H;if(x.length){x+="/"}if(A){J=1}for(;D<J;D++){C=0;if(A){E=z;k.push(y(I))}else{E=G[D].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&y(RegExp.$2))}B=E.split(",");H=B.length;for(;C<H;C++){F=B[C];i.push({media:F.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:k.length-1,hasquery:F.indexOf("(")>-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l<h){clearTimeout(r);r=setTimeout(j,h);return}else{l=z}for(var E in i){var K=i[E],C=K.minw,J=K.maxw,A=C===null,L=J===null,y="em";if(!!C){C=parseFloat(C)*(C.indexOf(y)>-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@{
ViewBag.Title = "登录失败";
}
<hgroup>
<h2>@ViewBag.Title。</h2>
<h3 class="text-danger">使用服务登录失败。</h3>
</hgroup>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment