Ejemplo n.º 1
0
        private async Task <TaskStatus> FreeStatus()
        {
            using (var client = ClientHelper.GetClient(CrossSettings.Current.GetValueOrDefault("token", "")))
            {
                DriverInfoService.InitializeClient(client);
                var o_data = await DriverInfoService.Free();

                if (o_data.Status == System.Net.HttpStatusCode.OK)
                {
                    //o_data.Message = "Успешно авторизован!";
                    Toast.MakeText(Activity, o_data.ResponseData.Message, ToastLength.Long).Show();
                    return(TaskStatus.OK);
                }
                else
                {
                    Toast.MakeText(Activity, o_data.Message, ToastLength.Long).Show();
                    return(TaskStatus.ServerError);
                }
            }
        }