protected void Anular_requerimiento(object sender, ImageClickEventArgs e)
    {
        ImageButton btnAnular = ((ImageButton)sender);
        GridViewRow row       = btnAnular.NamingContainer as GridViewRow;

        string pk = GridView1.DataKeys[row.RowIndex].Values[0].ToString();

        Session["IDE_ASIGNACION"] = GridView1.DataKeys[row.RowIndex].Values[0].ToString();
        string CODIGO_CARE_PADRE = GridView1.DataKeys[row.RowIndex].Values[1].ToString();
        string cleanMessage;
        int    Contador = 0;

        //REVISAMOS SI EXISTE ATENCION EL MOBILE
        BL_MOBILE objMB = new BL_MOBILE();
        DataTable dtMB  = new DataTable();

        dtMB = objMB.usp_RequerimientoListado_codigoCare(CODIGO_CARE_PADRE);
        if (dtMB.Rows.Count > 0)
        {
            //    IdEstadoRequerimiento
            //1   Pendiente
            //2   Aprobado
            string IdEstadoRequerimiento = dtMB.Rows[0]["IdEstadoRequerimiento"].ToString();
            if (IdEstadoRequerimiento.Trim() != "1")
            {
                Contador++;
            }
        }


        BL_TBL_RequerimientoSubDetalle objcare = new BL_TBL_RequerimientoSubDetalle();
        DataTable dtcare = new DataTable();

        dtcare = objcare.uspTBL_RequerimientoDetalle_EstadoAtencion(CODIGO_CARE_PADRE);
        if (dtcare.Rows.Count > 0)
        {   //Reqd_flagTemporal 0 es pendiente
            string Reqd_flagTemporal = dtcare.Rows[0]["Reqd_flagTemporal"].ToString();
            if (Reqd_flagTemporal == "1")
            {
                Contador++;
            }
        }


        if (Contador > 0)
        {
            cleanMessage = "No se puede realizar esta operación, requerimiento atendido";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
        else
        {
            Anular(pk);
        }
    }