public void Init()
        {
            if (_EventTypeORList != null)
            {
                _EventTypeORList.Clear();
            }
            else
            {
                _EventTypeORList = new ObservableCollection<EventTypeOR>();
            }

            EventTypeDA _DA = new EventTypeDA();
            var v=_DA.selectAllDate();
            foreach (var vobj in v)
            {
                _EventTypeORList.Add(vobj);
            }
        }
        /// <summary>
        /// 绑定下拉列表
        /// </summary>
        private void BindEvent()
        {
            if (EventTypeList == null)
            {
                EventTypeList = new EventTypeDA().selectAllDate();
                if (EventTypeList == null)
                    EventTypeList = new ObservableCollection<EventTypeOR>();
                EventTypeOR tempOR = new EventTypeOR() { Eventid = -1, Eventname = "" };
                EventTypeList.Insert(0, tempOR);

                SelectSwitchEventTypeOR = tempOR;
                SelectHiEventTypeOR = tempOR;
                SelectLoEventTypeOR = tempOR;
            }

            if (LightAlarmList == null)
            {
                LightAlarmList = new LightAlarmDA().selectAllDate();
                LightAlarmOR tempOR = new LightAlarmOR() { Lightid = -1, Lightname = "未启用声光报警" };
                if (LightAlarmList == null)
                    LightAlarmList = new ObservableCollection<LightAlarmOR>();
                LightAlarmList.Insert(0, tempOR);
                SelectLightAlarmOR = tempOR;
                SelectReleaseLightAlarmOR = tempOR;
            }

            SwitchvalueArr = new ObservableCollection<string>() { "", "高电平", "低电平" };
            selectSwitchvalue = "";
        }