Exemple #1
0
        private void btn_respuestas_Click(object sender, EventArgs e)
        {
            using (TRAtaMeWS.TRAtaMeWS TRAtaMe = new TRAtaMeWS.TRAtaMeWS())
            {
                string  listax         = "";
                string  listar         = "";
                string  mensaje        = "";
                char[]  delimiterChars = { '[' };
                object  CrLf           = System.Environment.NewLine;
                Spinner spn_episodio   = FindViewById <Spinner>(Resource.Id.spn_episodio);
                bool    hay            = false;

                if (spn_episodio.SelectedItemId != 0)
                {
                    hay = TRAtaMe.dame_respuestas_episodio(datos_informacion.id_episodio, ref mensaje, ref listax, ref listar);
                }

                if (mensaje != "")
                {
                    ShowAlert("ERROR", mensaje, "S", 0, null, null);
                }
                else
                {
                    if (hay)
                    {
                        string[] lista = listar.Split(delimiterChars);
                        mensaje = "Respuestas:" + CrLf;
                        for (int i = 0; i < lista.Count(); i++)
                        {
                            mensaje = mensaje + lista[i] + CrLf;
                        }
                    }
                    else
                    {
                        mensaje = "No existen respuestas";
                    }
                    ShowAlert("RESPUESTAS", mensaje, "S", 0, null, null);
                }
            }
        }