/// <summary> /// 新增杂项标注自身属性表 /// </summary> /// <param name="g3e_id"></param> /// <param name="g3e_fid"></param> /// <param name="parentfid">关联设备G3e_fid</param> /// <param name="text">标注内容</param> /// <param name="bzlx">标注类型</param> /// <param name="ssdw">所属单位</param> private static void InsertZXBZN(long g3e_id, long g3e_fid, long parentfid, string text, string bzlx, string ssdw) { var zxbzn = new Gg_gl_zxbz_n { G3E_ID = g3e_id, G3E_FID = g3e_fid, G3E_CNO = 25001, G3E_FNO = 250, G3E_CID = 1, MIF_TEXT = text, CD_BZLX = bzlx, CD_SSDW = ssdw, //BZ_DYSB = parentfid.ToString(), EntityState = EntityState.Insert, LTT_ID = MapConfig.Instance.LTTID }; DBManager.Instance.Insert(zxbzn); }
private void GetZXBZ() { //选择杂标显示修改 if (entityArgs.g3eObject.G3E_FNO == 250) { var g3e_fid = entityArgs.g3eObject.G3E_FID; zxbzn = DBEntityFinder.Instance.GetZxbzByG3e_Fid(g3e_fid); if (zxbzn != null) { Btn_Add.Enabled = true; SetBtnAttribute(BtnTag.UPDATE); TXT_BZNR.Text = zxbzn.MIF_TEXT; ComBox_SSDW.Text = zxbzn.CD_SSDW; ComBox_BZLX.Text = zxbzn.CD_BZLX; //long parentfid; //long.TryParse(zxbzn.BZ_DYSB, out parentfid); //SetZxbzValue(parentfid); } else { Btn_Add.Enabled = false; } } else { if (entityArgs.ObjId.IsNull) { return; } var entity = PublicMethod.Instance.GetObject(entityArgs.ObjId, OpenMode.ForRead); if (entity is BlockReference || entity is Polyline) { Btn_Add.Enabled = true; SetBtnAttribute(BtnTag.ADD); SetZxbzValue(entityArgs.g3eObject.G3E_FID); } else { Btn_Add.Enabled = false; } } }
public static bool UpdateZXBZN(string text, string bzlx, string ssdw, string dysbfid, Gg_gl_zxbz_n zxbzn) { try { zxbzn.CD_SSDW = ssdw; zxbzn.CD_BZLX = bzlx; zxbzn.MIF_TEXT = text; //zxbzn.BZ_DYSB = dysbfid; if (zxbzn.EntityState == EntityState.None) { zxbzn.EntityState = EntityState.Update; } DBManager.Instance.Update(zxbzn); return(true); } catch { return(false); } }