//Get Data Page and set Categories private void Get_Data_Page() { try { PageData = JsonConvert.DeserializeObject <PageClass>(Intent?.GetStringExtra("PageData")); if (PageData != null) { TxtTitle.Text = PageData.PageTitle; TxtUrl.Text = PageData.Username; TxtCategories.Text = Methods.FunString.DecodeString(PageData.Category); CategoryId = PageData.PageCategory; if (!string.IsNullOrEmpty(PageData.PageSubCategory)) { var category = CategoriesController.ListCategoriesPage.FirstOrDefault(categories => categories.CategoriesId == CategoryId)?.SubList.FirstOrDefault(sub => sub.CategoryId == PageData.PageSubCategory); if (category != null) { TxtSubCategories.Text = category.Lang; SubCategoryId = category.CategoryId; SubCategoriesLayout.Visibility = ViewStates.Visible; } } UsersPost = PageData.UsersPost; if (PageData.UsersPost == "1") //Enable { RadioDisable.Checked = false; RadioEnable.Checked = true; } else //Disable { RadioDisable.Checked = true; RadioEnable.Checked = false; } if (ListUtils.SettingsSiteList?.PageCustomFields?.Count > 0) { MAdapter.FieldList = new ObservableCollection <CustomField>(ListUtils.SettingsSiteList.PageCustomFields); MAdapter.NotifyDataSetChanged(); MRecycler.Visibility = ViewStates.Visible; } } } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
//Get Data Group and set Categories private void Get_Data_Group() { try { GroupData = JsonConvert.DeserializeObject <GroupClass>(Intent?.GetStringExtra("GroupData")); if (GroupData != null) { TxtTitle.Text = GroupData.GroupTitle; TxtUrl.Text = GroupData.Username; TxtAbout.Text = Methods.FunString.DecodeString(GroupData.About); TxtCategories.Text = CategoriesController.ListCategoriesGroup.FirstOrDefault(categories => categories.CategoriesId == GroupData.CategoryId)?.CategoriesName ?? GroupData.Category; CategoryId = GroupData.CategoryId; if (!string.IsNullOrEmpty(GroupData.SubCategory)) { var category = CategoriesController.ListCategoriesGroup.FirstOrDefault(categories => categories.CategoriesId == CategoryId)?.SubList.FirstOrDefault(sub => sub.CategoryId == GroupData.SubCategory); if (category != null) { SubCategoriesLayout.Visibility = ViewStates.Visible; TxtSubCategories.Text = category.Lang; SubCategoryId = category.CategoryId; } } if (ListUtils.SettingsSiteList?.GroupCustomFields?.Count > 0) { MAdapter.FieldList = new ObservableCollection <CustomField>(ListUtils.SettingsSiteList.GroupCustomFields); MAdapter.NotifyDataSetChanged(); MRecycler.Visibility = ViewStates.Visible; } } } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }