Example #1
0
        /// <summary>
        /// Carga la encuesta de satisfacción.
        /// </summary>
        public void LoadPoll()
        {
            try
            {
                PollManager pollManager = new PollManager();
                Poll        poll        = pollManager.GetInstantPoll();
                SessionUtilHelper.KeepInSession(poll.Id.ToString(), Session);

                if (poll != null && poll.Questions.Count > 0)
                {
                    txtPollTitle.InnerText  = poll.Name;
                    pollRepeater.DataSource = poll.Questions;
                    pollRepeater.DataBind();
                    divPoll.Visible = true;
                }
                else
                {
                    // No es prolijo porque se mezcla la parte visual con los datos, pero sirve
                    divPoll.Visible = false;
                }
            }
            catch (Exception exception)
            {
                //TODO - aplicar contorl e errores
                //((front)Master).Alert.Show("Excepción", exception.Message);
            }
        }