コード例 #1
0
 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
                 });
             }
         }
     }
 }
コード例 #2
0
        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;
        }
コード例 #3
0
        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();
        }
コード例 #4
0
 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];
 }
コード例 #5
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;
 }
コード例 #6
0
        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;
            }

        }
コード例 #7
0
        //获取区域名和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
                        });
                    }
                }
            }
        }