public async void showTotalPoint() { GetUserTotalPoint getUserPoint = new GetUserTotalPoint(); userTotalPoint = await getUserPoint.getUserTotalPoint(Xamarin.Forms.Application.Current.Properties["email"].ToString()); if (!string.IsNullOrEmpty(userTotalPoint)) { userPoint.Text = userTotalPoint; } else { userPoint.Text = "0"; } }
public async void showTotalPoint() { GetUserTotalPoint getUserPoint = new GetUserTotalPoint(); userTotalPoint = await getUserPoint.getUserTotalPoint(Xamarin.Forms.Application.Current.Properties["email"].ToString()); if (!string.IsNullOrEmpty(userTotalPoint) && int.Parse(userTotalPoint) >= 0) { userPoint.Text = userTotalPoint; } else if (!string.IsNullOrEmpty(userTotalPoint) && userTotalPoint == "-1") { await DisplayAlert("訊息", "取得使用者點數資料失敗!", "OK"); } else { userPoint.Text = "0"; } }