Beispiel #1
0
 protected void EliminarButton_Click(object sender, EventArgs e)
 {
     try
     {
         ObtenerValores();
         if (IdTextBox.Text == "")
         {
             Response.Write("<script>alert('Debe insertar un Id')</script>");
         }
         else
         {
             if (registro.Eliminar())
             {
                 Response.Write("<script>alert('Eliminado correctamente')</script>");
                 Limpiar();
             }
             else
             {
                 Response.Write("<script>alert('Error al eliminar')</script>");
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }