public void GridView1_RowCommand(Object sender, GridViewCommandEventArgs e)
        {
            bool        operacionRealizada = false;
            int         index        = Convert.ToInt32(e.CommandArgument);
            GridViewRow row          = _vista.GridView1.Rows[index];
            string      cuentaCodigo = Convert.ToString(row.Cells[1].Text);
            string      estatusPP    = Convert.ToString(row.Cells[3].Text).TrimEnd();

            if (estatusPP.Equals("activo"))
            {
                (miCuenta as CuentaPorPagar).IdCuentaPorPagar = cuentaCodigo;
                (miCuenta as CuentaPorPagar).Estatus          = "inactivo";
                //operacionRealizada = miLogica.ActivarDesactivarCpp(miCuenta);
                _Comando           = FabricaComando.CrearComandoActivarDesactivarCpp(miCuenta);
                operacionRealizada = _Comando.Ejecutar();
            }
            else if (estatusPP.Equals("inactivo"))
            {
                (miCuenta as CuentaPorPagar).IdCuentaPorPagar = cuentaCodigo;
                (miCuenta as CuentaPorPagar).Estatus          = "activo";
                // operacionRealizada = miLogica.ActivarDesactivarCpp(miCuenta);
                _Comando           = FabricaComando.CrearComandoActivarDesactivarCpp(miCuenta);
                operacionRealizada = _Comando.Ejecutar();
            }

            if (operacionRealizada.Equals(false))
            {
                _vista.Falla.Text    = "Operacion Fallida";
                _vista.Falla.Visible = true;
                _vista.Exito.Visible = false;
            }
            else if (operacionRealizada.Equals(true))
            {
                _vista.Exito.Text    = "Operacion Realizada Exitosamente";
                _vista.Exito.Visible = true;
                _vista.Falla.Visible = false;
            }
            if ((_vista.RazonSocial.SelectedValue != "0") && (_vista.Fechai.Text == "") && (_vista.Fechaf.Text == ""))
            {
                //solo proveedor
                _listaComando = FabricaComando.CrearComandoAbonarObtenerCuentasPorPagarProveedor(_vista.RazonSocial.SelectedValue.ToString());
                _milistaCpp   = _listaComando.Ejecutar();
                _vista.GridView1.DataSource = cargarTabla(_milistaCpp);
                _vista.GridView1.DataBind();
            }
            else if ((_vista.RazonSocial.SelectedValue == "0") && (_vista.Fechai.Text != "") && (_vista.Fechaf.Text != ""))
            {
                //solo por fechas
                _listaComando = FabricaComando.CrearComandoConsultarCuentasPorPagarFechasActivar(_vista.Fechai.Text, _vista.Fechaf.Text);
                _milistaCpp   = _listaComando.Ejecutar();
                _vista.GridView1.DataSource = cargarTablaFechas(_milistaCpp);
                _vista.GridView1.DataBind();
            }
            else if ((_vista.RazonSocial.SelectedValue != "0") && (_vista.Fechai.Text != "") && (_vista.Fechaf.Text != ""))
            {
                //todos los parametros
                _listaComando = FabricaComando.CrearComandoConsultarCuentasPorPagarFechasProveedorActivar(_vista.Fechai.Text, _vista.Fechaf.Text, _vista.RazonSocial.SelectedValue.ToString());
                _milistaCpp   = _listaComando.Ejecutar();
                _vista.GridView1.DataSource = cargarTablaTodosLosParametros(_milistaCpp);
                _vista.GridView1.DataBind();
            }
        }