Esempio n. 1
0
        public UserGroupPage()
        {
            InitializeComponent();
            this.BindingContext = new UserGroupPageViewModel();



            //var assembly = typeof(DynamicScreen).GetTypeInfo().Assembly;
            //Stream stream = assembly.GetManifestResourceStream("SampleDB.UserGroup.json");
            //using (var reader = new System.IO.StreamReader(stream))
            //{

            //    var json = reader.ReadToEnd();
            //    UserGroupModel userGroupModel = JsonConvert.DeserializeObject<UserGroupModel>(json);

            //    List<Group> sortingGroup = new List<Group>();
            //    for (int i = 0; i < userGroupModel.Groups.Count; i++){
            //        if (userGroupModel.Groups[i].GroupType.Level_Id == 2){
            //            sortingGroup.Add(userGroupModel.Groups[i]);
            //        }
            //    }

            //    pickerRef.ItemsSource = sortingGroup;
            //}


            homeListView.ItemSelected += (sender, e) => {
                if (e.SelectedItem != null)
                {
                    GetListViewDataModel userobj = e.SelectedItem as GetListViewDataModel;
                    Navigation.PushAsync(new UserGroupDetails(userobj));
                    homeListView.SelectedItem = null;
                }
            };
        }
Esempio n. 2
0
        public UserGroupDetails(GetListViewDataModel userObj)
        {
            InitializeComponent();
            gridRef.BindingContext = userObj;

            grantRef.Clicked += (sender, e) => {
                alertViewRef.IsVisible = true;
            };

            //alertNoRef.Clicked += (sender, e) => {
            //    alertViewRef.IsVisible = false;
            //};
        }