protected void grdCategorias_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         logCategoria categoria = new logCategoria();
         Categoria    cat       = categoria.Buscar(grdCategorias.Rows[Convert.ToInt32(e.CommandArgument)].Cells[0].Text);
         logAviso     avisos    = new logAviso();
         grdavisos.DataSource = avisos.Listar(cat.CodigoCat);
         grdavisos.DataBind();
     }
     catch (Exception ex)
     {
         lblMensaje.Text = ex.Message;
     }
 }
        protected void grdCategoria_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            try
            {
                lblError.Text = string.Empty;

                logCategoria logica      = new logCategoria();
                Categoria    categoria   = logica.Buscar(grdCategoria.Rows[Convert.ToInt32(e.CommandArgument)].Cells[0].Text);
                logAviso     logicaAviso = new logAviso();
                grdAviso.DataSource = logicaAviso.Listar(categoria.Codigo);
                grdAviso.DataBind();
            }
            catch (Exception ex)
            {
                lblError.Text = ex.Message;
            }
        }