private void Init()
        {
            _Window.cbStation.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);

            StationDA _staDA = new StationDA();
            StationORList = _staDA.selectAllStation();
        }
 public void Init()
 {
     _Window.cbStation.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);
     StationDA _staDA = new StationDA();
     StationORList = _staDA.selectAllStation();
     if (StationORList != null && StationORList.Count> 0)
     {
         SelectStationOR = StationORList.First();
     }
 }
예제 #3
0
 protected void Init()
 {
     StationDA _staDA = new StationDA();
     _StationORList = _staDA.selectAllStation();
 }
        private void Init()
        {
            _Window.cbStation.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);
            _Window.cbDeviceID.SelectionChanged += new SelectionChangedEventHandler(cbDeviceID_SelectionChanged);

            StationDA _staDA = new StationDA();
            StationORList = _staDA.selectAllStation();

            if (OperationType == OpType.Alert)
            {
                if (StationORList != null && AlramBindTimeObj != null)
                {
                    var vS = from f in StationORList where f.Stationid == AlramBindTimeObj.Stationid select f;
                    if (vS.Count() != 0)
                        SelectStationOR = vS.First();
                }
            }
        }
예제 #5
0
        private void Init()
        {
            _Window.cbStation.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);
            _Window.cbDeviceID.SelectionChanged += new SelectionChangedEventHandler(cbDeviceID_SelectionChanged);

            _Window.cbLinkageStation.SelectionChanged += new SelectionChangedEventHandler(cbLinkageStation_SelectionChanged);
            _Window.cbLinkageDeviceID.SelectionChanged += new SelectionChangedEventHandler(cbLinkageDeviceID_SelectionChanged);

            StationDA _staDA = new StationDA();
            var v = _staDA.selectAllStation();
            StationLinkageORList = new ObservableCollection<StationOR>();
            StationORList = new ObservableCollection<StationOR>();

            foreach (StationOR obj in v)
            {
                StationLinkageORList.Add(obj);
                StationORList.Add(obj);
                if (OperationType == OpType.Alert)
                {
                    if (obj.Stationid == LinkageSetObj.Stationid)
                        SelectStationOR = obj;
                    if (obj.Stationid == LinkageSetObj.Linkagestationid)
                        SelectLinkageStationOR = obj;
                }
            }
            if (OperationType == OpType.Alert)
            {
                cbStation_SelectionChanged(null, null);
                cbDeviceID_SelectionChanged(null, null);

                cbLinkageStation_SelectionChanged(null, null);
                cbLinkageDeviceID_SelectionChanged(null, null);
            }

            //值类型
            VlueTypeORList = new ObservableCollection<StatusOR>() {
            new StatusOR(){ ID=0, Name="模拟量"},
            new StatusOR(){ ID=1, Name="开关量"},
            new StatusOR(){ ID=2, Name="控制量"}
            };

            if (OperationType == OpType.Alert && LinkageSetObj != null)
            {
                var vValueT = from f in VlueTypeORList where f.ID == LinkageSetObj.Valuetype select f;
                if (vValueT.Count() > 0)
                    SelectVlueTypeOR = vValueT.First();
            }
        }
예제 #6
0
        private void Init()
        {
            DeviceORList = new ObservableCollection<DeviceOR>();

            StationDA _staDA = new StationDA();
            var v= _staDA.selectAllStation();
            StationORList=new ObservableCollection<StationOR>();
            foreach (StationOR obj in v)
            {
                StationORList.Add(obj);
            }
            SelectStationOR = StationORList.First();

            ReportTypeList = new ObservableCollection<ReportType>();
            //                                                通道  设备
            ReportType mRep = new ReportType(0, "设备历史报表",false,true);
            ReportTypeList.Add(mRep);
            SelectReportType = mRep;

            mRep = new ReportType(1, "测点历史报表", true, true);
            ReportTypeList.Add(mRep);

            mRep = new ReportType(2, "报警历史报表", false, false);
            ReportTypeList.Add(mRep);

            mRep = new ReportType(3, "数据月报表", false, true);
            ReportTypeList.Add(mRep);

            mRep = new ReportType(4, "数据年报表", false, true);
            ReportTypeList.Add(mRep);
        }
예제 #7
0
        public void Init()
        {
            StartDate = DateTime.Now.AddDays(-7); // Convert.ToDateTime("2011-10-01");
            StartTime = "00:00:00";
            EndDate = DateTime.Now; // Convert.ToDateTime("2011-10-15");
            EndTime = "23:59:59";

            AlarmLogS = new ObservableCollection<AlarmLogOR>();

            StationDA _staDA = new StationDA();
            StationORList = _staDA.selectAllStation();
            StationOR tempOR = new StationOR();
            tempOR.Stationid = -1;
            tempOR.Stationname = "所有站点";
            StationORList.Insert(0,tempOR);
            SelectStationOR = tempOR;

            EventLists = new ObservableCollection<StatusOR>() {
            new StatusOR(){ ID=1, Name="1"},
            new StatusOR(){ ID=2, Name="2"},
            new StatusOR(){ ID=3, Name="3"},
            new StatusOR(){ ID=4, Name="4"},
            new StatusOR(){ ID=5, Name="5"},
            new StatusOR(){ ID=6, Name="6"}
            };
            StatusOR temp = new StatusOR() { ID = -1, Name = "所有事件级别" };
            EventLists.Insert(0, temp);
            SelectEventOR = temp;

            //所有事件
            EventsNames = new ObservableCollection<string>();
            EventsNames = _dev.GetAllEventsName();
            EventsNames.Insert(0,"所有事件名称");
            SelectEventName = "所有事件名称";

            DeviceORList = new ObservableCollection<DeviceOR>();
            //DeviceOR objTemp = new DeviceOR() { Deviceid = -1, Devicename = "所有设备" };
            DeviceOR objTemp = new DeviceOR() { Deviceid = -1, Devicename = "所有设备" };
            DeviceORList.Insert(0, objTemp);
            SelectDeviceOR = objTemp;
        }
예제 #8
0
        private void Init()
        {
            StationORList = new ObservableCollection<StationOR>();
            StationDA _staDA = new StationDA();
            var v = _staDA.selectAllStation();
            foreach (StationOR obj in v)
            {

                StationORList.Add(obj);
                if (OperationType == OpType.Alert)
                {
                    if (obj.Stationid == ScreenObj.StationID)
                        SelectStationOR = obj;
                }
            }
        }
예제 #9
0
        private void Init()
        {
            _Window.cbStation.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);
            _Window.cbDeviceTypeID.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);

            _Window.cbDeviceID.SelectionChanged += new SelectionChangedEventHandler(cbDeviceID_SelectionChanged);

            //初使化值
            DateTimeHH = GlobalData.DateHH;
            DateTimeMi = GlobalData.DateMi;
            SelectDateTimeHH = "00";
            SelectDateTimeMi = "00";

            StationDA _staDA = new StationDA();
            StationORList = _staDA.selectAllStation();

            DeviceAndTypeDA _DTypeDA = new DeviceAndTypeDA();
            this.DeviceTypeORList = _DTypeDA.GetAllDeviceType();

            if (OperationType == OpType.Alert)
            {
                LoadVlaue();

                if (StationORList != null && InspectionObj != null)
                {
                    var vS = from f in StationORList where f.Stationid == InspectionObj.Stationid select f;
                    if (vS.Count() != 0)
                        SelectStationOR = vS.First();
                }

                if (DeviceTypeORList != null && InspectionObj != null)
                {
                    var vDty = from f in DeviceTypeORList where f.Devicetypeid == InspectionObj.Devicetypeid select f;
                    if (vDty.Count() != 0)
                        SelectDeviceTypeOR = vDty.First();
                }
            }
        }
예제 #10
0
        private void Init()
        {
            MainteStatusORList = new ObservableCollection<StatusOR>() {
            new StatusOR(){ ID=1, Name="开始维护"},
            new StatusOR(){ ID=2, Name="维护中断"},
            new StatusOR(){ ID=3, Name="完成维护"}
            };

            if (OperationType == OpType.Alert && MainteObj != null)
            {
                var v = from f in MainteStatusORList where f.ID == MainteObj.Valuetype select f;
                if (v.Count() > 0)
                    SelectMainteStatus = v.First();
            }

            _Window.cbStation.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);

            StationDA _staDA = new StationDA();
            StationORList = _staDA.selectAllStation();

            if (OperationType == OpType.Alert)
            {
                if (StationORList != null && MainteObj != null)
                {
                    var vS = from f in StationORList where f.Stationid == MainteObj.Stationid select f;
                    if (vS.Count() != 0)
                        SelectStationOR = vS.First();
                }
            }
        }
예제 #11
0
        public void Init()
        {
            StationDA _staDA = new StationDA();
               StationORList = _staDA.selectAllStation();

               if (StationORList != null && StationORList.Count > 0)
               SelectStationOR = StationORList.First();
        }
예제 #12
0
        private void Init()
        {
            StationDA _staDA = new StationDA();
            StationORList = _staDA.selectAllStation();

            if (OperationType == OpType.Alert)
            {
                if (StationORList != null && AlarmGroupsObj != null)
                {
                    var vS = from f in StationORList where f.Stationid == AlarmGroupsObj.Stationid select f;
                    if (vS.Count() != 0)
                        SelectStationOR = vS.First();
                }
            }
        }
        private void Init()
        {
            _Window.cbStation.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);
            _Window.cbDeviceID.SelectionChanged += new SelectionChangedEventHandler(cbDeviceID_SelectionChanged);

            StationDA _staDA = new StationDA();
            StationORList = _staDA.selectAllStation();

            if (OperationType == OpType.Alert)
            {
                SetFalseType(FalseAlarmPolicyObj.Falsetype);
                if (StationORList != null && FalseAlarmPolicyObj != null)
                {
                    AlarmPolicyObj = new AlarmPolicyManagementDA().selectARowDate(FalseAlarmPolicyObj.Policyid.ToString());

                    var vS = from f in StationORList where f.Stationid == AlarmPolicyObj.Stationid select f;
                    if (vS.Count() != 0)
                        SelectStationOR = vS.First();
                }
            }
        }
        private void Init()
        {
            cbStation.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);
            cbDeviceTypeID.SelectionChanged += new SelectionChangedEventHandler(cbStation_SelectionChanged);
            cbDeviceID.SelectionChanged += new SelectionChangedEventHandler(cbDeviceID_SelectionChanged);

            StationDA _staDA = new StationDA();
            StationORList = _staDA.selectAllStation();

            DeviceAndTypeDA _DTypeDA = new DeviceAndTypeDA();
            this.DeviceTypeORList = _DTypeDA.GetAllDeviceType();

            ReportType = new ObservableCollection<string>() { "按月统计", "按日统计" };
            SelectReport = "按月统计";
        }
예제 #15
0
 public void Init()
 {
     StationDA _staDA = new StationDA();
     StationORList = _staDA.selectAllStation();
     if (StationORList != null && StationORList.Count > 0)
     {
         SelectStationOR = StationORList.First();
     }
     StartDate = DateTime.Now;// Convert.ToDateTime("2011-10-02");// DateTime.Now;
 }