protected void grFormulario_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Indice       = int.Parse(e.CommandArgument.ToString());
            int idFormulario = int.Parse(grFormulario.Rows[Indice].Cells[0].Text);

            if (e.CommandName == "Eliminar")
            {
                Formulario OBJ = new Formulario();

                int resultado = OBJ.EliminarFormulario(idFormulario, 5);//POner el usuario de session que modificara
                if (resultado > 0)
                {
                    ListarFormulario();
                    ClientScript.RegisterStartupScript(Page.GetType(), "Mensaje", "<script type='text/javascript'>alert('Se Elimino el Formulario');</script>");
                    return;
                }
            }

            if (e.CommandName == "Editar")
            {
                DataTable dt = new DataTable();

                Formulario OBJ = new Formulario();

                dt = OBJ.ListarFormularioXID(idFormulario);
                foreach (DataRow item in dt.Rows)
                {
                    txtNombre.Value         = item["Nombre"].ToString().ToString();
                    txtRuta.Value           = item["Ruta"].ToString().ToString();
                    txtGrupo.Value          = item["Grupo"].ToString().ToString();
                    ddlEstado.SelectedValue = item["EstadoInt"].ToString().ToString();
                }
                //--Botones
                btnModificar_fr.Visible = true;

                btnRegistro.Visible = false;
                //hidden iddireccion
                hdIdFormulario.Value = idFormulario.ToString();
                PanelAgregar.Visible = true;
                PanelListar.Visible  = false;

                //ClientScript.RegisterStartupScript(Page.GetType(), "Mensaje", "<script type='text/javascript'>alert('Se Actualizo la direccion correctamente');</script>");
                //return;
            }
        }