示例#1
0
        private async void btn_getJsonData_Click(object sender, RoutedEventArgs e)
        {
            var f = await JsonAsDbRepository.GetUserData("stephan");

            Debug.WriteLine(f.ToString());
            this.ShowMessage(f.ToString());
        }
示例#2
0
        private async void btn_saveNewData_Click(object sender, RoutedEventArgs e)
        {
            string newText = txtUserId.Text.ToString() ?? "stephan";

            App.userLocalAppData.UserId = newText;
            await JsonAsDbRepository.UpdateJsonFile(App.userLocalAppData);

            btn_saveInLocalGet.Content = "Get New Data";
            btn_getJsonData.Content    = "Get New Json Data";
        }
示例#3
0
        private async void btn_saveInLocalGet_Click(object sender, RoutedEventArgs e)
        {
            App.userLocalAppData = await JsonAsDbRepository.GetUserSavedData("stephan");

            ShowMessage(App.userLocalAppData.UserId);
        }
示例#4
0
 private async void SetIntitalData()
 {
     JsonAsDbRepository jsonAsDbRepository = new JsonAsDbRepository(localSettings, "stephan");
     //i am aware that there in no need of this but writing to test that things working fin with static or not
     await JsonAsDbRepository.CreateJsonFile();
 }