protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            ViewModel = new HPUserViewModel(e.Parameter as HPUserDetail);
            me = e.Parameter as HPUserDetail;
            Infoes = ViewModel.ToDic();
            

            lv_Mgr.Opacity = 0;
            processBar.Opacity = 1;
            processBar.IsIndeterminate = true;

            var result = await PeopleFinderHelper.GetManagers(ViewModel.Uid);
            Managers = new Queue<HPUserDetail>();
            Managers.Enqueue(me);
            //Managers = new List<HPUserDetail>();
            foreach (var r in result.result)
            {
                Managers.Enqueue(r.First());
                //Managers.Add(r.First());
            }
            
            this.Bindings.Update();
            processBar.IsIndeterminate = false;
            processBar.Opacity = 0;
            lv_Mgr.Opacity = 1;
            
        }
예제 #2
0
 public void TestMethod1()
 {
     HPUserViewModel vm = new HPUserViewModel();
     var dic = vm.ToDic();
     Assert.AreEqual<int>(dic.Count, 20);
 }
        private void lv_Mgr_Tapped(object sender, TappedRoutedEventArgs e)
        {
            var people = (sender as GridView).SelectedItem as HPUserDetail;


            if(people!=null)
            {
                ViewModel = new HPUserViewModel(people);
                Infoes = ViewModel.ToDic();
                this.Bindings.Update();


                //while(Managers.Count>0)
                //{
                //    var manager = Managers.Dequeue();
                //    if(string.Compare(people.employeeNumber,manager.employeeNumber)==0)
                //    {
                //        ViewModel = new HPUserViewModel(people);
                //        Managers = new Queue<HPUserDetail>(Managers);
                //        Infoes = ViewModel.ToDic();
                //        this.Bindings.Update();
                //        break;
                //    }
                //}
            }
        }