示例#1
0
 private void SendOrder()
 {
     spinner = UIUtils.ShowSpinner(this);
     if (_order.IsUpdate)
     {
         DataGate.UpdateAppointment(_order.AppointmentId, _order, AddOrUpdateAppointmentResult);
     }
     else
     {
         DataGate.AddAppointment(string.Empty, _order, AddOrUpdateAppointmentResult);
     }
 }
示例#2
0
        private void SendOrder()
        {
            var spinner = UIUtils.ShowSpinner(this);

            DataGate.AddAppointment(string.Empty, _order, resp =>
            {
                UIUtils.HideSpinner(this, spinner);
                if (resp.Code == ResponseCode.OK && resp.Result == "true")
                {
                    Device.BeginInvokeOnMainThread(() =>
                    {
                        tabView.IsVisible = false;
                        if (tabViewContent != null)
                        {
                            tabViewContent.IsVisible = false;
                            alertInfo.IsVisible      = false;
                        }
                        info.Children.Add(new Label
                        {
                            Text = "Your beauty professional has received\n your booking request and will get back\n "
                                   + " to you shortly.\n\n"
                                   + "You can check out the status of your\n request on the MyAppointments\n menu item",
                            TextColor  = Color.Black,
                            FontFamily = UIUtils.FONT_SFUIDISPLAY_REGULAR,
                            HorizontalTextAlignment = TextAlignment.Center,
                            VerticalOptions         = LayoutOptions.CenterAndExpand,
                            Margin = new Thickness(10)
                        });
                        continueButton.IsVisible = true;
                        continueButton.Clicked  -= OnContinueClick;
                        continueButton.Clicked  += (o, a) =>
                        {
                            Utils.ShowPageFirstInStack(this, new CustomerAppointments());
                        };
                        continueButton.Text = "CHECK MY APPOINTMENTS";
                        header = UIUtils.MakeHeader(this, "Booking Confirmed");
                        main.Children.RemoveAt(0);
                        main.Children.Insert(0, header);
                    });
                }
                else
                {
                    UIUtils.ShowMessage("Booking was not added. Try later.", this);
                }
            });
        }