Example #1
0
        protected void guadar_edicion_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(this.nuevo_nombre_txt.Text))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "mensaje", "<script> swal({type: 'error',title: 'Completo Todos Los Campos',text: 'Algo salió mal!',timer: 3200}) </script>");
            }
            else
            {
                controlador_prueba = new PruebaController(0, this.nuevo_nombre_txt.Text, 0, "", 0);
                if (controlador_prueba.editar_pruebas(this.lista_pruebas.SelectedValue))
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "mensaje", "<script> swal({position: 'center',type: 'success',title: 'Cambios Guardados',showConfirmButton: false,timer: 2500}) </script>");
                    this.nuevo_nombre_txt.Text = "";
                }
                else
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "mensaje", "<script> swal({type: 'error',title: 'Cambios No! Guardados',text: 'Algo salió mal!',timer: 3200}) </script>");
                }

                // actualziando los campos las pruebas

                if (!Page.IsPostBack)
                {
                    return;
                }
                this.lista_pruebas.Items.Clear();
                this.lista_pruebas.Items.Insert(0, new ListItem("-- Seleccione una prueba -- "));
                cargar_pruebas();
            }
        }
Example #2
0
        protected void crear_prueba_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrWhiteSpace(this.name_prueba.Text))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "mensaje", "<script> swal({type: 'error',title: 'Complete Todos Los Campos',text: 'Algo salió mal!',timer: 3200}) </script>");
            }
            else
            {
                controlador_prueba = new PruebaController(0, this.name_prueba.Text, 0, "A", 0);
                if (controlador_prueba.crear_prueba(this.lista_contenidoss.SelectedValue))
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "mensaje", "<script> swal({position: 'center',type: 'success',title: 'Registro Exitoso',timer: 2500}) </script>");

                    this.name_prueba.Text = "";
                }
                else
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "mensaje", "<script> swal({type: 'error',title: 'Prueba No Creada',text: 'Algo salió mal!',timer: 3200}) </script>");
                }

                // actualizando campos
                if (!Page.IsPostBack)
                {
                    return;
                }
                this.lista_contenidoss.Items.Clear();
                this.lista_contenidoss.Items.Insert(0, new ListItem("-- Seleccionar Contenido -- "));
                cargar_contenido_BD();
            }
        }
Example #3
0
 private void cargar_pruebas()
 {
     controlador_prueba               = new PruebaController(0, "", 0, "", 0);
     consulta_lista_prueba            = controlador_prueba.consulta_combox_nombre();
     this.lista_pruebas.DataTextField = "nombre_prueba";
     this.lista_pruebas.DataSource    = consulta_lista_prueba;
     lista_pruebas.DataBind();
 }
Example #4
0
 private void cargar_pruebas_BD()
 {
     controlador_prueba               = new PruebaController(0, "", 0, "", Convert.ToInt32(ViewState["id_aux_contenido"].ToString()));
     consulta_lista_prueba            = controlador_prueba.consulta_prueba_x_contenido_combox();
     this.lista_pruebas.DataTextField = "nombre_prueba";
     this.lista_pruebas.DataSource    = consulta_lista_prueba;
     lista_pruebas.DataBind();
 }
Example #5
0
 protected void btnEliminar_Click(object sender, EventArgs e)
 {
     controlador_prueba = new PruebaController(0, this.lista_pruebas.SelectedValue, 0, "", 0);
     if (controlador_prueba.eliminar_pruebas())
     {
         ClientScript.RegisterStartupScript(this.GetType(), "mensaje", "<script> swal({position: 'center',type: 'success',title: 'Eliminacion Exitosa',showConfirmButton: false,timer: 2500}) </script>");
     }
     else
     {
         ClientScript.RegisterStartupScript(this.GetType(), "mensaje", "<script> swal({type: 'error',title: 'Prueba No Eliminada',text: 'Algo salió mal!',timer: 3200}) </script>");
     }
 }
Example #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack == false)
     {
         listaNumeroOutp = new List <int>();
         listaNumeroOutp.Clear();
         PruebaC = new PruebaController();
         EcrituraPreguntaRespuesta();
         PreguntasCorrectas     = 0;
         PreguntasIncorrectas   = 0;
         preguntasNocontestadas = 0;
     }
 }
Example #7
0
        //public static int contador;

        protected void Page_Load(object sender, EventArgs e)
        {
            pruebaCtrl = new PruebaController();

            if (!IsPostBack)
            {
                //if (!SitePrincipal.IsIntruso())
                //{
                CargarPrueba();
                //}
                //else
                //    Response.Redirect("~/Account/Login");
            }
        }