private void StoreMarkerProcess(string dataSourceObjGuid, string markerType, ref YWCHEntEx db) { var dataSourceType = db.SkyGetSJLYMDL(dataSourceObjGuid).SJLYLXID; var markerGuid = db.SkyFrmDzdx(dataSourceType, dataSourceObjGuid, markerType); //var pointList = new List<DMarker>(); //var sourcePoints = db.SkyGetGeoDataList(dataSourceObjGuid).GetObjData(0).Points; //for (var index = 0; index < sourcePoints.Count; index++) //{ // var thisPoint = sourcePoints.GetPoint(index); // pointList.Add(new DMarker // { // X = thisPoint.X, // Y = thisPoint.Y, // Z = thisPoint.Z, // DZDXLX = "KZD", // SD = 0 //SD? 深度桩号需要写嘛? // }); //} //db.SkyAddDzdxMXZB(SourceGuid, markerGuid, pointList); db.SkyAddConnect(1, Ts.Guid, markerGuid); }
public virtual void Store(string dataSourceObjGuid, ref YWCHEntEx db) { //上传TS部件文件 db.SkyUploadPartVer(Ts.Guid, Ts.FilePath); //创建地质对象(几何部件、界线、结构面等),并关联ts switch (MarkerType) { case "几何部件": //以标识点(BSD)形式创建几何部件地质对象(数据来源级别?) var sourceGuid = db.SkyNewObject("BSD", Guid, DbGeoType, Name, Color); db.SkyAddConnect(1, Ts.Guid, sourceGuid); //? break; case "界线": StoreMarkerProcess(dataSourceObjGuid, "DXM", ref db); break; case "结构面": StoreMarkerProcess(dataSourceObjGuid, "JGM", ref db); break; case "崩塌": StoreMarkerProcess(dataSourceObjGuid, "BT", ref db); break; case "滑坡": StoreMarkerProcess(dataSourceObjGuid, "HP", ref db); break; case "泥石流": StoreMarkerProcess(dataSourceObjGuid, "NSL", ref db); break; case "构造带": StoreMarkerProcess(dataSourceObjGuid, "GZD", ref db); break; default: MessageBox.Show(@"Marker类型无效。", @"保存失败"); return; } }