public void getAreaRId() { AreaName.Clear(); if (Cr.CoreMims.Services.UserInfo.UserLoginInfo.D) { foreach (var t in Wlst.Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo) { string area = t.Value.AreaName; AreaName.Add(new RtuAmpSxxViewModel.AreaInt() { Value = t.Value.AreaId.ToString("d2") + "-" + area, Key = t.Value.AreaId }); } } else { foreach (var t in Cr.CoreMims.Services.UserInfo.UserLoginInfo.AreaR) { if (Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.ContainsKey(t)) { string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new RtuAmpSxxViewModel.AreaInt() { Value = t.ToString("d2") + "-" + area, Key = t }); } } } }
public TimeTableSelectWindow() { InitializeComponent(); this.WindowStartupLocation = WindowStartupLocation.CenterScreen; AreaName.Clear(); if (Cr.CoreMims.Services.UserInfo.UserLoginInfo.D) { foreach (var t in Wlst.Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo) { string area = t.Value.AreaName; AreaName.Add(new AreaInt() { Value = area, Key = t.Value.AreaId }); } } else { foreach (var t in Cr.CoreMims.Services.UserInfo.UserLoginInfo.AreaR) { if (Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.ContainsKey(t)) { string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new AreaInt() { Value = area, Key = t }); } } } var av = false; if (AreaName.Count > 1) { av = true; } TimeTables.Clear(); foreach (var t in AreaName) { foreach (var itemTable in WeekTimeTableInfoService.GeteekTimeTableInfoList(t.Key)) { TimeTables.Add(new TimeTable() { IsChecked = false, Area = t.Key + "-" + t.Value, Id = itemTable.TimeId, Name = itemTable.TimeName, NameDesc = itemTable.TimeDesc, AreaId = t.Key, AreaView = av }); } } time.ItemsSource = TimeTables; }
public void NavOnLoad(params object[] parsObjects) { deleteing = true; CleanSluCtrls(); AreaName.Clear(); if (Cr.CoreMims.Services.UserInfo.UserLoginInfo.D) { foreach (var t in Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.Keys) { string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new AreaInt() { Value = area, Key = t }); } } else { foreach (var t in Cr.CoreMims.Services.UserInfo.UserLoginInfo.AreaW) { if (Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.ContainsKey(t)) { string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new AreaInt() { Value = area, Key = t }); } } } if (AreaName.Count > 0) { AreaComboBoxSelected = AreaName[0]; } if (AreaName.Count > 1) { Visi = Visibility.Visible; } else { Visi = Visibility.Collapsed; } //LoadTimeItem(AreaId); //LoadTimeItems(); }
public void getAreaRId() { AreaName.Clear(); AreaName.Add(new AreaInt() { Value = "全部", Key = -1 }); if (Cr.CoreMims.Services.UserInfo.UserLoginInfo.D) { foreach (var t in Wlst.Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo) { var tmlLstOfArea = Wlst.Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.GetRtuInArea(t.Value.AreaId); if (tmlLstOfArea.Count == 0) { continue; } string area = t.Value.AreaName; AreaName.Add(new AreaInt() { Value = t.Value.AreaId.ToString("d2") + "-" + area, Key = t.Value.AreaId }); } } else { foreach (var t in Cr.CoreMims.Services.UserInfo.UserLoginInfo.AreaR) { if (Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.ContainsKey(t)) { var tmlLstOfArea = Wlst.Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.GetRtuInArea(t); if (tmlLstOfArea.Count == 0) { continue; } string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new AreaInt() { Value = t.ToString("d2") + "-" + area, Key = t }); } } } AreaComboBoxSelected = AreaName[0]; }
public void GetAreaId4W() { AreaName.Clear(); if (Cr.CoreMims.Services.UserInfo.UserLoginInfo.D) { foreach (var t in Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.Keys) { string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new AreaInt() { Value = area, Key = t }); } } else { foreach (var t in Cr.CoreMims.Services.UserInfo.UserLoginInfo.AreaW) { if (Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.ContainsKey(t)) { string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new AreaInt() { Value = area, Key = t }); } } } //foreach (var t in Cr.CoreMims.Services.UserInfo.UserLoginInfo.AreaW) //{ // if (Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.ContainsKey(t)) // { // string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; // AreaName.Add(new AreaInt() {Value = area, Key = t}); // } //} if (AreaName.Count > 0) { AreaComboBoxSelected = AreaName[0]; } Visi = AreaName.Count > 1 ? Visibility.Visible : Visibility.Collapsed; }
public void NavOnLoad(params object[] parsObjects) { AreaName.Clear(); if (Cr.CoreMims.Services.UserInfo.UserLoginInfo.D) { foreach (var t in Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.Keys) { string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new AreaInt() { Value = t.ToString("d2") + "-" + area, Key = t }); } } else { foreach (var t in Cr.CoreMims.Services.UserInfo.UserLoginInfo.AreaW) { if (Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.ContainsKey(t)) { string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new AreaInt() { Value = t.ToString("d2") + "-" + area, Key = t }); } } } if (AreaName.Count > 0) AreaComboBoxSelected = AreaName[0]; if (AreaName.Count > 1) { Visi = Visibility.Visible; } else { Visi = Visibility.Collapsed; } }
public void NavOnLoad(params object[] parsObjects) { isViewActive = true; AreaName.Clear(); getAreaRId(); if (AreaName.Count > 0) { AreaComboBoxSelected = AreaName.First(); } if (AreaName.Count > 1) { Visi = Visibility.Visible; } else { Visi = Visibility.Collapsed; } IsEnableFirst = CurRuleItem != null; Remark = "操作步骤:1、规则调整,2、增加或选中方案,3、方案基本信息,4、选择终端,5、设定请求数据的时间,6、请求并计算上下限,7、保存"; }
//获取区域名和ID public void GetAreaRId() { AreaName.Clear(); if (Cr.CoreMims.Services.UserInfo.UserLoginInfo.D) { foreach (var t in Wlst.Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo) { string area = t.Value.AreaName; var areainfo = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.GetRtuInArea(t.Value.AreaId); if (areainfo == null) { continue; } if (areainfo.Count == 0) { continue; } bool haveRtu = false; foreach (var g in areainfo) { if (g > 1000000 && g < 1100000) { haveRtu = true; break; } } if (haveRtu == false) { continue; } AreaName.Add(new AreaInt() { Value = t.Value.AreaId.ToString("d2") + "-" + area, Key = t.Value.AreaId }); } } else { foreach (var t in Cr.CoreMims.Services.UserInfo.UserLoginInfo.AreaR) { if (Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo.ContainsKey(t)) { var areainfo = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.GetRtuInArea(t); if (areainfo == null) { continue; } if (areainfo.Count == 0) { continue; } bool haveRtu = false; foreach (var g in areainfo) { if (g > 1000000 && g < 1100000) { haveRtu = true; break; } } if (haveRtu == false) { continue; } string area = Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.AreaInfo[t].AreaName; AreaName.Add(new AreaInt() { Value = t.ToString("d2") + "-" + area, Key = t }); } } } }
public void OnUserHideOrClosing() { AreaName.Clear(); TunnelItems.Clear(); }