示例#1
0
        private void ListasPrecios_ItemSelected(object sender, AdapterView.ItemSelectedEventArgs e)
        {
            try
            {
                Spinner ListaPreciosSelecc = (Spinner)sender;

                string CategoriaBusq = ListaPreciosSelecc.GetItemAtPosition(e.Position).ToString();
                ClientesLista = new List <TablaClientes>();
                ClientesLista = db.BuscarClienteporLista(CategoriaBusq);
                if (ClientesLista.Count == 0)
                {
                    listaOK = false;
                    Toast.MakeText(this, "Esta lista no pertenece a sus clientes, no puede ser utilizada", ToastLength.Long).Show();
                }
                else
                {
                    Toast.MakeText(this, "lista aplicada", ToastLength.Long).Show();
                    listaOK = true;
                }
                //   Toast.MakeText(this, "Se cargo la categoria: " + CategSelecc.GetItemAtPosition(e.Position), ToastLength.Long).Show();
            }catch (Exception ex)
            {
                listaOK = false;
                Toast.MakeText(this, ex.Message, ToastLength.Long).Show();
            }
        }