Ejemplo n.º 1
0
        private async void GetPhoto()
        {
            try
            {
                using (var client = ClientHelper.GetClient(CrossSettings.Current.GetValueOrDefault("token", "")))
                {
                    ManageOrderService.InitializeClient(client);
                    var o_data = new ServiceResponseObject <SuccessResponse>();
                    o_data = await ManageOrderService.GetPhoto(StaticOrder.Order_id);

                    if (o_data.Status == HttpStatusCode.OK)
                    {
                        ///дописать
                        StaticOrder.File_Name     = o_data.Message;
                        StaticOrder.MessageResult = "0";
                        StartUp.StartTracking(Activity, 2);
                    }
                    else
                    {
                        Toast.MakeText(Activity, o_data.Message, ToastLength.Long).Show();
                    }
                }
            }
            catch (System.Exception ex)
            {
                Toast.MakeText(Activity, ex.Message, ToastLength.Long).Show();
            }
        }
Ejemplo n.º 2
0
        private async void GetPhoto(string id, AlertDialog.Builder alert)
        {
            try
            {
                using (var client = ClientHelper.GetClient(CrossSettings.Current.GetValueOrDefault("token", "")))
                {
                    ManageOrderService.InitializeClient(client);
                    var o_data = new ServiceResponseObject <SuccessResponse>();
                    o_data = await ManageOrderService.GetPhoto(id);

                    if (o_data.Status == HttpStatusCode.OK)
                    {
                        StaticOrder.File_Name     = o_data.Message;
                        StaticOrder.MessageResult = "0";
                        StartUp.StartTracking(context, 2);
                    }
                    else
                    {
                        Toast.MakeText(context, o_data.Message, ToastLength.Long).Show();
                    }
                }
            }
            catch (Exception ex)
            {
                Toast.MakeText(context, ex.Message, ToastLength.Long).Show();
            }
        }