private WorkingFace AddWorkingFace(MiningArea miningArea, String workingFaceName) { var workingFace = new WorkingFace { WorkingFaceName = workingFaceName, MiningArea = miningArea, WorkingfaceTypeEnum = WorkingfaceTypeEnum.HC }; workingFace.Save(); return(workingFace); }
/// <summary> /// 提交按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSubmit_Click(object sender, EventArgs e) { //验证 if (!check()) { DialogResult = DialogResult.None; return; } DialogResult = DialogResult.OK; //实体赋值 bindTunnelJJEntity(); //设置巷道为掘进巷道 tunnelEntity.TunnelType = TunnelTypeEnum.TUNNELLING; jjWorkFaceEntity.Save(); tunnelEntity.Save(); }
/// <summary> /// 删除GIS回采进尺图形信息 /// </summary> /// <param name="hd1">主运顺槽id</param> /// <param name="hd2">辅运顺槽id</param> /// <param name="qy">切眼id</param> /// <param name="bid">回采进尺的BindingID</param> /// <param name="wfEntity">回采面实体</param> /// <param name="zywid"></param> /// <param name="fywid"></param> private void DelHcjc(int hd1, int hd2, int qy, string bid, WorkingFace wfEntity, double zywid, double fywid) { //删除对应的回采进尺图形和数据表中的记录信息 var results = Global.cons.DelHCCD(hd1.ToString(CultureInfo.InvariantCulture), hd2.ToString(CultureInfo.InvariantCulture), qy.ToString(CultureInfo.InvariantCulture), bid, zywid, fywid, Global.searchlen); if (results == null) { return; } //更新当前回采进尺后的回采进尺记录表信息 var count = results.Keys.Count; var index = 0; IPoint posnew = null; foreach (var key in results.Keys) { var x = results[key].X; var y = results[key].Y; var z = results[key].Z; wfEntity.SetCoordinate(x, y, z); wfEntity.Save(); index += 1; if (index == count - 1) { posnew = new PointClass { X = x, Y = y, Z = z }; } } //更新回采进尺表,将isdel设置0 var entity = DayReportHc.FindByBid(bid); entity.IsDel = 0; entity.SaveAndFlush(); //更新地质构造表中的信息 if (posnew == null) { return; } var hdIds = new List <int> { hd1, hd2, qy }; var dzxlist = Global.commonclss.GetStructsInfos(posnew, hdIds); if (dzxlist.Count > 0) { GeologySpaceBll.DeleteGeologySpaceEntityInfos(wfEntity.WorkingFaceId); //删除工作面ID对应的地质构造信息 foreach (var key in dzxlist.Keys) { var geoinfos = dzxlist[key]; foreach (var tmp in geoinfos) { var geologyspaceEntity = new GeologySpace { WorkingFace = wfEntity, TectonicType = Convert.ToInt32(key), TectonicId = tmp.geoinfos[GIS_Const.FIELD_BID], Distance = tmp.dist, OnDateTime = DateTime.Now.ToShortDateString() }; geologyspaceEntity.Save(); } } } }