protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            LoadLocales();

            object cloure_param = CloureManager.GetParameter();

            txtCliente.Focus(FocusState.Programmatic);
            if (cloure_param != null)
            {
                if (cloure_param.GetType() == typeof(CartItem))
                {
                    CartItem item = (CartItem)CloureManager.GetParameter();
                    addProductToCarrito(item);
                }
                if (cloure_param.GetType() == typeof(CloureParam))
                {
                    CloureParam cloureParam = (CloureParam)CloureManager.GetParameter();
                    if (cloureParam.name == "finish")
                    {
                        Receipt receipt = (Receipt)cloureParam.value;
                        ShowFinishedDialog(receipt);
                        Clear();
                    }
                }
            }

            check_monthly_exceed();
        }
Example #2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            //Verify GoBack Method
            var cParameter = CloureManager.GetParameter();

            if (cParameter != null)
            {
                if (cParameter.GetType() == typeof(CloureParam))
                {
                    CloureParam cloureParam = (CloureParam)cParameter;
                    if (cloureParam.name == "place_id")
                    {
                        LoadPlaces((int)cloureParam.value);
                    }
                    if (cloureParam.name == "artist_id")
                    {
                        LoadBandArtists((int)cloureParam.value);
                    }
                }
                else if (cParameter.GetType() == typeof(List <User>))
                {
                    List <User> users_tmp = (List <User>)cParameter;
                    selectedShow.Fotografos.Clear();
                    foreach (User item in users_tmp)
                    {
                        selectedShow.Fotografos.Add(item);
                    }
                }
            }
        }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     if ((string)CloureManager.GetParameter() == "reload")
     {
         LoadData();
     }
 }
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            lstPhotographers.ItemsSource = null;

            if (e.Parameter != null)
            {
                if (e.Parameter.GetType() == typeof(int))
                {
                    int id = (int)e.Parameter;
                    show = await Shows.Get(id);

                    txtFecha.Date = show.Fecha.Value;
                    txtBandaArtista.SelectedValue = show.ArtistaId;
                    txtLugar.SelectedValue        = show.LugarId;
                    lstPhotographers.ItemsSource  = null;
                    lstPhotographers.ItemsSource  = show.Fotografos;
                    //LoadData(id);
                }
            }
            else
            {
                show          = new Show();
                show.Id       = 0;
                txtFecha.Date = DateTime.Now;
                txtBandaArtista.SelectedIndex = -1;
                txtLugar.SelectedIndex        = -1;
            }

            //Verify GoBack Method
            var cParameter = CloureManager.GetParameter();

            if (cParameter != null)
            {
                if (cParameter.GetType() == typeof(CloureParam))
                {
                    CloureParam cloureParam = (CloureParam)cParameter;
                    if (cloureParam.name == "place_id")
                    {
                        LoadPlaces((int)cloureParam.value);
                    }
                    if (cloureParam.name == "artist_id")
                    {
                        LoadBandArtists((int)cloureParam.value);
                    }
                }
                else if (cParameter.GetType() == typeof(ObservableCollection <User>))
                {
                    fotografos      = (ObservableCollection <User>)cParameter;
                    show.Fotografos = fotografos;
                    lstPhotographers.ItemsSource = null;
                    lstPhotographers.ItemsSource = fotografos;
                }
            }
        }