示例#1
0
        public void GetGrpIdByAreaId()
        {
            GroupName.Clear();

            if (AreaId == -1)//全部区域
            {
                GrpVisi = Visibility.Collapsed;
            }
            else
            {
                GrpVisi = Visibility.Visible;
                var area = Wlst.Sr.EquipmentInfoHolding.Services.AreaInfoHold.MySlef.GetAreaInfo(AreaId);
                if (area == null)
                {
                    return;
                }
                var grps =
                    Wlst.Sr.EquipmentInfoHolding.Services.ServicesGrpSingleInfoHold.GrpInfoList(AreaId);
                GroupName.Add(new GroupInt()
                {
                    Value = "无", Key = -1
                });
                if (grps.Count > 0)
                {
                    var grpsTmp = (from t in grps orderby t.GroupId select t).ToList();
                    foreach (var f in grpsTmp)
                    {
                        GroupName.Add(new GroupInt()
                        {
                            Value = f.GroupName, Key = f.GroupId
                        });
                    }
                }
                GroupComboBoxSelected = GroupName[0];
            }
        }
 private void button2_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     GroupName.Clear();
     textBox1.Clear();
 }