Exemplo n.º 1
0
        protected void ButtonEliminar_Click(object sender, EventArgs e)

        {
            string Rut = TextBoxRut.Text;

            if (UsuarioDAO.Eliminar(Rut) == true)

            {
                string mensaje = "Bien, datos eliminados";

                LabelError.Text = "";

                LabelOk.Text = "Bien, usuario eliminado.";

                ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + mensaje + "');", true);
            }

            else

            {
                LabelOk.Text = "";

                LabelError.Text = "Error, usuario no existe con ese RUT";
            }
        }
Exemplo n.º 2
0
        protected void ButtonEliminar_Click(object sender, EventArgs e)
        {
            string Rut = TextBoxRut.Text;

            if (UsuarioDAO.Eliminar(Rut) == true)
            {
                LabelError.Text = "";
                LabelOk.Text    = "Bien, usuario eliminado.";
            }
            else
            {
                LabelOk.Text    = "";
                LabelError.Text = "Error, usuario no existe con ese RUT";
            }
        }