/// <summary> /// 根据id号,删除指定告警 /// </summary> /// <param name="id"></param> /// <returns></returns> public bool DeleteSpecifiedLocationAlarm(int id) { BLL.Bll bll = new BLL.Bll(false, true, true); BLL.Buffers.AuthorizationBuffer ab = BLL.Buffers.AuthorizationBuffer.Instance(bll); List <int> idList = new List <int>() { id }; return(DeleteLocationAlarm(idList)); }
/// <summary> /// 批量删除告警 /// </summary> /// <param name="idList"></param> /// <returns></returns> public bool DeleteLocationAlarm(List <int> idList) { BLL.Bll bll = new BLL.Bll(false, true, true); BLL.Buffers.AuthorizationBuffer ab = BLL.Buffers.AuthorizationBuffer.Instance(bll); List <DbModel.Location.Alarm.LocationAlarm> reviseAlarms = ab.DeleteSpecifiedLocationAlarm(idList); if (reviseAlarms == null || reviseAlarms.Count == 0) { return(false); } else { //新增,服务端消警后,把消警信息发给客户端 var alarms = reviseAlarms.ToTModel().ToArray(); AlarmHub.SendLocationAlarms(alarms); return(true); } }
private void LoadData() { fileArchorList = ArchorHelper.LoadArchoDevInfo().ArchorList; Group1.Header += " " + fileArchorList.Count; DataGrid1.ItemsSource = fileArchorList; BLL.Bll bll = new BLL.Bll(); dbArchorList = bll.Archors.ToList(); if (dbArchorList == null) { MessageBox.Show("加载基站列表出错:" + bll.Archors.ErrorMessage); return; } DataGridDb.ItemsSource = dbArchorList; string path = AppDomain.CurrentDomain.BaseDirectory + "\\Data\\基站信息\\UDPArchorList.xml"; udpArchorList = XmlSerializeHelper.LoadFromFile <UDPArchorList>(path); Group2.Header += " " + udpArchorList.Count; DataGrid2.ItemsSource = udpArchorList; var switchAreas = bll.bus_anchor_switch_area.ToList(); var list4 = bll.bus_anchors.ToList(); if (list4 != null) { Group4.Header += " " + list4.Count; DataGrid4.ItemsSource = list4; } areas = bll.Areas.ToList(); Check(); }
/// <summary> /// 获取物理逻辑拓扑 /// </summary> /// <returns></returns> public IList <PhysicalTopology> GetPhysicalTopologyList(int view) { ShowLog(">>>>> GetPhysicalTopologyList"); BLL.Bll dbpt = new BLL.Bll(false, false, false, false); return(new AreaService(dbpt).GetList(view)); }
private TagRelationBuffer() { this.bll = Bll.NewBllNoRelation(); LoadData(); }
private TagRelationBuffer(Bll bll) { this.bll = bll; LoadData(); }
public DbInitializer(Bll bll) { _bll = bll; }
public AreaTreeInitializer(Bll bll) { _bll = bll; }
public void ShowInfo(Archor archor) { this._archor = archor; dev = archor.DevInfo; BLL.Bll bll = new BLL.Bll(); PropertyGrid1.SelectedObject = archor; PropertyGrid2.SelectedObject = archor.DevInfo; archorSetting = bll.ArchorSettings.GetByArchor(archor); if (archorSetting == null) { //archorSetting = new ArchorSetting(archor); dev = archor.DevInfo; //var archor = archors[i]; archorSetting = new ArchorSetting(archor.Code, archor.Id); archorSetting.Name = archor.Name; var area = dev.Parent; var x = dev.PosX; var y = dev.PosZ; if (dev.ParentId == 2) //电厂 { archorSetting.RelativeMode = RelativeMode.相对园区; archorSetting.RelativeHeight = archor.Y; archorSetting.AbsoluteHeight = archor.Y; var park = area; var leftBottom = park.InitBound.GetLeftBottomPoint(); archorSetting.SetZero(leftBottom.X, leftBottom.Y); archorSetting.SetRelative((x - leftBottom.X), (y - leftBottom.Y)); archorSetting.SetAbsolute(x, y); } else { var floor = area; var building = floor.Parent; archorSetting.RelativeHeight = archor.Y; archorSetting.AbsoluteHeight = (archor.Y + building.GetFloorHeight(floor.Id)); var minX = floor.InitBound.GetZeroX() + building.InitBound.GetZeroX(); var minY = floor.InitBound.GetZeroY() + building.InitBound.GetZeroY(); var room = Bll.GetDevRoom(floor, dev); if (room != null) { archorSetting.RelativeMode = RelativeMode.相对机房; var roomX = room.InitBound.GetZeroX(); var roomY = room.InitBound.GetZeroY(); archorSetting.SetPath(room, floor, building); archorSetting.SetZero(roomX, roomY); archorSetting.SetRelative((x - roomX), (y - roomY)); archorSetting.SetAbsolute((minX + x), (minY + y)); } else { archorSetting.RelativeMode = RelativeMode.相对楼层; archorSetting.SetPath(null, floor, building); archorSetting.SetZero(0, 0); archorSetting.SetRelative(x, y); archorSetting.SetAbsolute((minX + x), (minY + y)); } } } PropertyGrid3.SelectedObject = archorSetting; }
public TagRelationBuffer() { this.bll = new Bll(false, false, false, false); LoadData(); }
public TagRelationBuffer(Bll bll) { this.bll = bll; LoadData(); }
/// <summary> /// 获取物理逻辑拓扑 /// </summary> /// <returns></returns> public IList <PhysicalTopology> GetPhysicalTopologyList(int view) { ShowLogEx(">>>>> GetPhysicalTopologyList"); BLL.Bll dbpt = Bll.NewBllNoRelation(); return(new AreaService(dbpt).GetList(view)); }