public ExamList() { jsToUrl = new GetJsToUrl(url, name); InitializeComponent(); PickerSelectSemester.Items.Add("1 семестр"); PickerSelectSemester.Items.Add("2 семестр"); }
public AchievementsPage() { jsToUrl = new GetJsToUrl(url, name); jsToUrl.LoadData(url, name); this.BindingContext = jsToUrl; string sToken = DependencyService.Get <ISaveAndLoad>().LoadText(name); achievementList = JsonConvert.DeserializeObject <List <AchievementData> >(sToken); InitializeComponent(); MainListView.ItemsSource = achievementList; }
private void LoadGrantsDataFromJson() { GetJsToUrl jsonLocalGrants = new GetJsToUrl(grantsJsonUrl, jsonGrantsLocalName); string localJsonGrants = DependencyService.Get <ISaveAndLoad>().LoadText(jsonGrantsLocalName); var deserializedJsonGrants = JsonConvert.DeserializeObject <List <GrantsData> >(localJsonGrants); for (int i = 0; i < deserializedJsonGrants.Count; i++) { grants.Add(deserializedJsonGrants[i]); } Resources.Add("grants", grants); }
public StudentInfoPage() { Resources = new Xamarin.Forms.ResourceDictionary(); modelStudent = new List <ViewModelStudent>(); jsInfoStudent = new GetJsToUrl(url, name); var localJsonGrants = DependencyService.Get <ISaveAndLoad>().LoadText(name); var deserializedJsonInfoStudent = JsonConvert.DeserializeObject <StudentInfoJS>(localJsonGrants); modelStudent.Add(ConvertStudentInfo("ФИО", deserializedJsonInfoStudent.Fio)); modelStudent.Add(ConvertStudentInfo("Номер зачетной книжки", deserializedJsonInfoStudent.StudentNumber)); modelStudent.Add(ConvertStudentInfo("Факультет (институт)", deserializedJsonInfoStudent.Oop.Faculty)); modelStudent.Add(ConvertStudentInfo("Направление (специальность)", deserializedJsonInfoStudent.Oop.FullSpzName)); modelStudent.Add(ConvertStudentInfo("Профиль", deserializedJsonInfoStudent.Oop.FullStdName)); modelStudent.Add(ConvertStudentInfo("Курс", deserializedJsonInfoStudent.EduGroup.Course)); modelStudent.Add(ConvertStudentInfo("Группа", deserializedJsonInfoStudent.GroupName)); modelStudent.Add(ConvertStudentInfo("Академический статус", deserializedJsonInfoStudent.AcademicState)); Resources.Add("addInfo", modelStudent); InitializeComponent(); }