예제 #1
0
        private void ShowPersons()
        {
            if (currentArea == null)
            {
                return;
            }
            if (AreaCanvas1 == null)
            {
                return;
            }
            var service = new PersonService();
            //var persons = service.GetListByArea(area.Id + "");
            //if (persons == null)
            //{
            //    persons = service.GetListByArea("");
            //}
            var persons    = service.GetList(true);
            var posService = new PosService();
            var posList    = posService.GetList();//todo:实时数据以后从缓存中取

            foreach (var item in persons)
            {
                var pos = posList.FirstOrDefault(i => i.Tag == item.Tag.Code);
                item.Pos = pos;
            }
            AreaCanvas1.ShowPersons(persons);
        }
예제 #2
0
        private void RefreshData()
        {
            PosService service = new PosService();

            posList = service.GetList();
            DataGrid1.ItemsSource = posList;
        }
예제 #3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var service = new PosService();

            DataGrid1.ItemsSource = service.GetList();
        }